Is the center position of the mounted object always used when mounting an object to a link point? [RESOLVED]
by Randy Lutcavich · in Torque X 2D · 09/22/2009 (3:55 pm) · 3 replies
Functionality:
I'm mounting a lightning attack object to a player controlled blue dot.
Problem:
The attack object is always mounted at its center. Is there a type of link point that I can set for the mounted object or will it always mount at its center?
Solution:
?
I'm mounting a lightning attack object to a player controlled blue dot.
Problem:
The attack object is always mounted at its center. Is there a type of link point that I can set for the mounted object or will it always mount at its center?
Solution:
?
About the author
Recent Threads
#2
Let me explain.
I have one object that has added transparency to it so that other objects can mount to it without covering up the actual graphic. But when this extra large object is rotated, it rotates around the center of the entire object (including the transparency) instead of the center of the graphic that the player sees. This is a bit clunky for player movements so I decided to add a small invisible object and then attach this larger object (and the objects that are mounted to it) to it. That way the player movements (especially rotation) would all be around a center location. The only problem is that the larger object wants to mount at its center (right in the middle of the transparency) so I have to use the offset mount function as you explained.
That seems perfect and the offset is exact BUT there seems to be a bug. Now when my player moves he takes a huge wide turn or moves the wrong direction. I have no idea what is going on. I really want this to work but I'm completely lost on what is causing this.
My movement component is quite large now so I must take the time to clearly search through it and make sure nothing else is screwing with this code.
09/30/2009 (4:15 am)
Ah this would be perfect for what I am trying to do now but it seems to cause a major bug in my player controls at the moment.Let me explain.
I have one object that has added transparency to it so that other objects can mount to it without covering up the actual graphic. But when this extra large object is rotated, it rotates around the center of the entire object (including the transparency) instead of the center of the graphic that the player sees. This is a bit clunky for player movements so I decided to add a small invisible object and then attach this larger object (and the objects that are mounted to it) to it. That way the player movements (especially rotation) would all be around a center location. The only problem is that the larger object wants to mount at its center (right in the middle of the transparency) so I have to use the offset mount function as you explained.
That seems perfect and the offset is exact BUT there seems to be a bug. Now when my player moves he takes a huge wide turn or moves the wrong direction. I have no idea what is going on. I really want this to work but I'm completely lost on what is causing this.
My movement component is quite large now so I must take the time to clearly search through it and make sure nothing else is screwing with this code.
#3
I had collision enabled on both objects.
Unchecking Enable Collisions on my large object and then changing all my code to work with the bottom object seems to fix this.
09/30/2009 (4:45 am)
Nevermind... I must be tired again.I had collision enabled on both objects.
Unchecking Enable Collisions on my large object and then changing all my code to work with the bottom object seems to fix this.
Torque Owner Jake Davis