Collision isn't working as expected...
by Brandon Fogerty · in Technical Issues · 06/02/2008 (7:42 pm) · 3 replies
Hi guys. I am trying to simulate traffic in my game. Anyways I have two way points which are the Torque Logo models. One of the Torque logo models is called "T1" and the other "T2". The car will start from T1's position and once it collides with T2, it will start back at T1's position again.
T1 and T2 belong to the TorqueLogoitem datablock.
To test collision, I implemented the TorqueLogoItem::onCollision method.
Long story short, when ever there is a collision with one of these 2 models, I want the console to print out the name of the model which the car collided with as a test. However whenever I run this example, it only works when the car collides with T1. I know that the car collides with T2 as well because I can see visually that the car passes through T2 as well. However Torque doesn't seem to fire the onCollision event when the car collides with the T2 model. Again T1 and T2 both belong to the same datablock so it was my assumption that the TorqueLogoItem::onCollision method would be fired when ANY object collides with another object that is linked with the TorqueLogoItem datablock. Am I wrong?
Have any of you run into this problem? Thanks!
T1 and T2 belong to the TorqueLogoitem datablock.
To test collision, I implemented the TorqueLogoItem::onCollision method.
Long story short, when ever there is a collision with one of these 2 models, I want the console to print out the name of the model which the car collided with as a test. However whenever I run this example, it only works when the car collides with T1. I know that the car collides with T2 as well because I can see visually that the car passes through T2 as well. However Torque doesn't seem to fire the onCollision event when the car collides with the T2 model. Again T1 and T2 both belong to the same datablock so it was my assumption that the TorqueLogoItem::onCollision method would be fired when ANY object collides with another object that is linked with the TorqueLogoItem datablock. Am I wrong?
Have any of you run into this problem? Thanks!
Torque 3D Owner Brandon Fogerty
DapSoft