PointEntity and Quad Roll
Blitz3D Forums/Blitz3D Programming/PointEntity and Quad Roll
| ||
Hi :) It was a long time that i have post a blitz3d problem :) But i become crazy with quad roll. Trye this code and press key UP, you will see the sprite made a unwanted roll And want only a camera facing, but without roll !! it is possible ? I have search many solutions and informations on the forum or code archive but i find nothing to help me ? or i'm idiot and i have not very well search ? (possible) I think that the POINTENTITY command is the problem, but i don't understand how make some quad => camera/facing without this function ? Cheers |
| ||
why not use the sprite command set ? I often use the vector commands or atan2() to point things at objects but i'm thrown by your use of a pivot for the camera ... how is the pivot entity going to be used to relate to the camera ? You can use the vector commands or atan2() to calculate the bearing between two positions and modify the angle based upon the rotation of your camera or pivot - depening upon which of those two entities is holding your rotational information. |
| ||
"why not use the sprite command set ?" The problem is the same with sprite But for a mathematical solution, do you have an example ? |
| ||
I swapped your createPoly function for a basic sprite creation function and it didnt roll like your exampleFunction createPoly(xpos#,zpos#,x#,z#) sprite=CreateSprite() ScaleSprite sprite,x,z PositionEntity sprite,xpos,0,zpos Return sprite End Function When working in psuedo 2D you might also want to get into the habbit of using x and z as your primary plain with y as your depth, this will make entityRoll() your tertiary rotation field thus resolve many Eular issues without having to think about them., |
| ||
I'll retry to work with sprite, thanks becky. |
| ||
Filax, I see no purpose for the pivot but it seems to be causing the issues. If you remove all references to it and rotate the camera itself this all works fine. Stevie |