Model facing wrong wait with PointEntity

Blitz3D Forums/Blitz3D Beginners Area/Model facing wrong wait with PointEntity

LineOf7s(Posted 2005) [#1]
w00h00 my first Blitz3D-related post! The journey of a thousand miles...

My problem:
- Load in model
- RotateEntity during initialisation of program so it faces the 'right' direction
- Use PointEntity in main loop to aim model at another entity (in this case, a targeting reticule), but before 'pointing' it seems to have returned to its 'default' direction as loaded in

I'm as susceptible to a good "RTFM" as the next coder, so if you just wanna toss a command name at me that'll be fine... but how to 'set' the direction of the model so I can use it later at that setting?


[edit] OMG - I'm now one of Those People that misspell the topic title! THE SHAME!! 'wait' = 'way' [/edit]


Shambler(Posted 2005) [#2]
You could create a pivot,parent the rotated model to it then use the pointentity command on the pivot...I think ;)


jhocking(Posted 2005) [#3]
I would use AlignToVector. You can use TFormPoint on the target's position to get the vector to align to.


GitTech(Posted 2005) [#4]
RotateMesh() instead of RotateEntity()?


LineOf7s(Posted 2005) [#5]
Yes GitTech, that worked exactly how I wanted it to.

*scratches head* But I coulda sworn I tried that...

Thankyou - I was in the middle of trying to get my head around TFormPoint and AlignToVector. You have saved me, for now. :o)