Linkpoint positions
by Dan Pascal · in Torque X 2D · 01/06/2009 (2:07 pm) · 6 replies
Hey guys,
I want to reposition 3 objects mounted to a sprite
Can I just set the position of each linkpoint, or do I have to use an interface?
I've been looking at getLinkPoint(), but that won't let me set it, will it?
I'm still hazy about the interface set up.
Any suggestions?
I want to reposition 3 objects mounted to a sprite
Can I just set the position of each linkpoint, or do I have to use an interface?
I've been looking at getLinkPoint(), but that won't let me set it, will it?
I'm still hazy about the interface set up.
Any suggestions?
About the author
#3
I can get and set the links but the objects attached to them wont move with them. I've tried the Snapto(), and even a remount.
The only thing that I can do consistantly is a dismount.
Have you tried the float interface thing yet?
01/09/2009 (5:32 pm)
Thanks Vishal,I can get and set the links but the objects attached to them wont move with them. I've tried the Snapto(), and even a remount.
The only thing that I can do consistantly is a dismount.
Have you tried the float interface thing yet?
#4
That will make it easier to help you, ok?
01/10/2009 (5:33 pm)
Please post the code you are using to mount them and the code used to move your objectThat will make it easier to help you, ok?
#5
Here's a few tips for those interested.
If you are mounting an object "A", on an object that's moving, "B", "A" has to have a PhysicsComponent added to it.
TURN OFF THAT NASTY "POOL WITH COMPONENTS"
oh that is a bad bad one. It draws you in cause you think you're being all efficient using it. But don't!
I'd say wait until your game is built and running- then start messing with it.
It can do really naughty things.
So this is how I reposition mounted objects on a moving object:
find previous mounted objects using GetMountedObjects, delete them
add new linkpoints in the new positions, but using the existing linkpoint names (ie LinkPoint1, LinkPoint2)
clone new objects and mount them
make sure the cloned object has a PhysicsComponent
TURN OFF THAT NASTY "POOL WITH COMPONENTS"
(Hey Diego thanks, I was writing this while you were posting! I solved it -)
01/10/2009 (5:43 pm)
OK only three days of agony, but I 've solved it.Here's a few tips for those interested.
If you are mounting an object "A", on an object that's moving, "B", "A" has to have a PhysicsComponent added to it.
TURN OFF THAT NASTY "POOL WITH COMPONENTS"
oh that is a bad bad one. It draws you in cause you think you're being all efficient using it. But don't!
I'd say wait until your game is built and running- then start messing with it.
It can do really naughty things.
So this is how I reposition mounted objects on a moving object:
find previous mounted objects using GetMountedObjects, delete them
add new linkpoints in the new positions, but using the existing linkpoint names (ie LinkPoint1, LinkPoint2)
clone new objects and mount them
make sure the cloned object has a PhysicsComponent
TURN OFF THAT NASTY "POOL WITH COMPONENTS"
(Hey Diego thanks, I was writing this while you were posting! I solved it -)
#6
01/10/2009 (6:11 pm)
Ok! And thanks for sharing the solution. I was thinking on using pool with components for most of my development, but now I'll be extra carefull when doing it.
Torque Owner Dan Pascal
has anybody used getLinkPoint() effectively?