How do I (can I) move a TSStatic object? (T3D) [SOLVED]
by Keith G Wood · in Technical Issues · 04/09/2011 (7:49 pm) · 3 replies
I have a simple TSStatic model in a normally fixed position which I want to move slightly on a certain event.
The TSStatic member list includes setTransform() - so I assumed I could simply pass the appropriate string to this function & my object would jump from its original to its new postion - but this doesn't work.
So, I've also called getTransform() before & after the call to setTransform() to see what's happending. What happens is getTransform() returns the same value before & after the call to setTransform() (i.e. it the "set" has not changed anything). The string being passed to setTransform() is identical in all respects to the string returned by getTransform, except for the y-axis value.
Now I could do this by deleting the TSStatic model & recreating it in the new position - but this seems an overkill method. I could also make the model an AImodel & use a move-to, but that is overkill too because I dont want all the attributes of an AImodel (and, in fact, I explicitly dont want the model to respond to gravity - I want it to sit in mid air).
Any sugestions?
The TSStatic member list includes setTransform() - so I assumed I could simply pass the appropriate string to this function & my object would jump from its original to its new postion - but this doesn't work.
So, I've also called getTransform() before & after the call to setTransform() to see what's happending. What happens is getTransform() returns the same value before & after the call to setTransform() (i.e. it the "set" has not changed anything). The string being passed to setTransform() is identical in all respects to the string returned by getTransform, except for the y-axis value.
Now I could do this by deleting the TSStatic model & recreating it in the new position - but this seems an overkill method. I could also make the model an AImodel & use a move-to, but that is overkill too because I dont want all the attributes of an AImodel (and, in fact, I explicitly dont want the model to respond to gravity - I want it to sit in mid air).
Any sugestions?
About the author
The perverse mind behind Bad Taste Software: http://www.badtastesoftware.co.uk
Associate Steve Acaster
[YorkshireRifles.com]
If you want a "dynamic" object, try a StaticShape class. Or you could make your own based on the RenderShapeExample (I think that's the right one, it's networked but doesn't have collision if I remember correctly).