trueaxis.com Forum Index trueaxis.com
True Axis Physics SDK Forum
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Possible a bug? [The collision list is empty]
Goto page 1, 2  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Bugs
View previous topic :: View next topic  
Author Message
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Sat Aug 27, 2005 6:57 pm    Post subject: Possible a bug? [The collision list is empty] Reply with quote

Hi,

I've observed one problem with dynamic object; with a lot of them the collision list of them is empty. They continue colliding but in the list there isn't any info about them. It occurs when I have about 30 dynamicObjects set as ghost. It occurs when I have less dynamicObject set as ghost and other dynamicObjects set as no ghost, too.

However, with less objects all works ok. Could it be a bug?

Thanks for your patience
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Olex



Joined: 09 Apr 2005
Posts: 101
Location: USA, KY

PostPosted: Sat Aug 27, 2005 9:26 pm    Post subject: Reply with quote

Luke should know more, but as a programmer, I can tell that it would be very hard to tell anything from your question. The only way would be to try the same setup, and run some debugging, and get some data:

Code:
//where X = 1..n
step X:
  object1: collisions = 2, (maybe position? if all size are the same, say box[1,1,1])
  ...
  objectm: collisions = 0
end of step
step X+1:
....

_________________
Ukrainian Rumble 2: Destructible Physics
My philosophy: Objectivism
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Sun Aug 28, 2005 12:51 am    Post subject: Reply with quote

Well, ok, probably I've explained bad and with few information. I will try to give more and best information about the problem. Sorry Embarassed. However, I have to tell that the error is difficult to cuantize, because there could be a lot of factors, I think.

The example that I said above is the more simple situation. I've testing with a TA::DynamicObject like a car, and the others are TA:DynamicObject set as ghost (I use these as checkpoints). Well, I try to modify the number of 'ghost' objects. All works fine until the number of checkpoints are more or equal than 25.

What's is wrong? Well, before have 25 checks, all the collisions between the checks or the statics objects (the map) are in the collision list of the car. But if the map has 25 or more, this list is empty.

It`s difficult for me to explain the problem at this level in English. I reviewed my code several times, and my partner, too. However, if you need, I can post all the project code [I've no problem with this. I only want to fix the possible bug]

Thanks for your time.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Olex



Joined: 09 Apr 2005
Posts: 101
Location: USA, KY

PostPosted: Sun Aug 28, 2005 1:23 am    Post subject: Reply with quote

Your english seems fine to me , just try to explain your best, english speakers should get it anyway. Wink

I guess the best way is to try to simplify your code a bit by bit, while still having the problem. In this case, you might even get away without graphics, etc. So, goal is to cut down the project into a small version that contains only physics and the problem.

Once that is done, feel free to post the code somewhere, and gives us a link. If it happens to be small enough, just post it here. Unless Luke minds. Very Happy
_________________
Ukrainian Rumble 2: Destructible Physics
My philosophy: Objectivism
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Sun Aug 28, 2005 12:31 pm    Post subject: Reply with quote

Quote:

I guess the best way is to try to simplify your code a bit by bit, while still having the problem. In this case, you might even get away without graphics, etc. So, goal is to cut down the project into a small version that contains only physics and the problem.


Well, I think that is unnecesary. The problem isn't an exception or something like that, that could be originated by interferences with other modules of a project. Simply, the collisions list aren't filled. The dynamic objects are placed in the correct positions (I can see it with the debug lines) and the physic behaviour is ok. I use line collisions intersections and works ok, too.

If luke needs it, I will try to reduce my project, of course. But as I said above, I don't think that it's necesary at now.
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Mon Aug 29, 2005 3:43 am    Post subject: Reply with quote

Let try to understand the problem...

How are you checking for collisions? I guesss you are using TA::DynamicObject::GetCollisionIterator.

If you are using TA::DynamicObject::GetCollisionIterator, then make sure to use TA::DynamicObject::SetCollisionListEnabled(true). (This was new in version 1.0.0.7)

If you have 24 or less TA::DynamicObjects, with TA::DynamicObject::SetGhost(true), then everything works ok?

But if you have 25 or more, you get no collisions you use TA::DynamicObject::GetCollisionIterator? Not collisions at all?

This sounds very strange.

This is only one thing I can think off...

This is a limit to the number of collisions that can fit into the lists. If too many collisions happen at once and the list gets full, then you will miss many collisions. Is it possible some how you are making many many collisions happen? I sugest you use TA::DynamicObject::SetMovementDisabled(true) on check points if you are not already doing this.
Back to top
View user's profile Send private message Send e-mail
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Mon Aug 29, 2005 7:51 am    Post subject: Reply with quote

luke wrotes wrote:
This is a limit to the number of collisions that can fit into the lists. If too many collisions happen at once and the list gets full, then you will miss many collisions. Is it possible some how you are making many many collisions happen? I sugest you use TA::DynamicObject::SetMovementDisabled(true) on check points if you are not already doing this.


Umm, it's possible that could be that. If I set movement disabled to checks, there are collisions with the rest of dynamic/static objects. But I can set movement disabled to checkpoints, because if I do it to a DynamicObject you can pass throw the object (the doc says that should be appear rigid to other objects Rolling Eyes ) and no collision is produced.

EDITED:

I think that I found the problem. The DynamicObject that acts as checkpoint was 0.1m bigger thant it should be. So it was 5cm into the static object that limits it. I think that it could be producing all these collisions. Althouht, can pass throw a dynamicobjetc with movement dissabled is ok?

Thanks
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Mon Aug 29, 2005 8:43 am    Post subject: Reply with quote

I thought this might be your problem. This is a little strange becouse , if the check points are still, TrueAxis should send them to sleep, and turn off collision testing for them. So they should stop giving making collisions. (Unless you keep calling TA::Physics::SetDynamicObjectIsMoving to wake them up)

To anwer your question:
If an object is a ghost and movement is disabled, then other objects will pass through, and collisions will be added to the lists.

So, for check points, both SetMovementDisabled(true) and SetGhost(true) is good!
Back to top
View user's profile Send private message Send e-mail
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Mon Aug 29, 2005 8:46 am    Post subject: Reply with quote

Yeah, the problem is that I've try with no ghost objects and I still passing throw them, and there is no collisions with them. Althought, the problem with checks is solved now.

Thanks
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Mon Aug 29, 2005 11:13 am    Post subject: Reply with quote

The only reason I can think of that might cause objects to be able to be driven through with no collisoins occuring, is if there are already too many collisions.

There is a maximum number of 4096 collisions at onces allowed which should normally be enough. This will probably become configurable sometime soon.
Back to top
View user's profile Send private message Send e-mail
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Mon Aug 29, 2005 12:24 pm    Post subject: Reply with quote

Sorry, I think that I've explained bad the problem. If the dynamicsObject has enabled the movement all goes ok (There are collisions, and now the checkpoints works ok too, beacuse I've resized them). But, if dynamicsObjects has disabled movement, then you can pass throught them. So, the problem this time isn't the number of collisions (I try this with few objects and the problem is the same).

luke wrotes wrote:
There is a maximum number of 4096 collisions at onces allowed which should normally be enough. This will probably become configurable sometime soon.


That's sounds great Very Happy
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Tue Aug 30, 2005 5:11 am    Post subject: Reply with quote

I am a little confused about the exact when this bug happens now.

Is Ghost set to true when this bug happens? Is the only problem that collisions don't end up in the collision lists?

There is an issue where collision lists are not added to objects that have fallen asleep or objects have movement disabled. However, the moving object will get the collision. This will be updated in the documentation.

So, check points with movement disabled will have no collisions in there collision lists, however, the car will get a collision in its list when it hits them.

Does that sound like what might be happening to you?
Back to top
View user's profile Send private message Send e-mail
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Tue Aug 30, 2005 10:03 am    Post subject: Reply with quote

No, the car hasn't this collisions in the collisions list. And now, to be or not a ghost object isn't the problem. I think the best way for explain that it's a new video. Cool :

-SetMovementDisabled(false)

-SetMovementDisabled(true)

As you see, if movement is disabled, objects don't collide with anything. [Of course, fences are no ghost]
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
luke
Site Admin


Joined: 15 Oct 2004
Posts: 621

PostPosted: Tue Aug 30, 2005 10:27 am    Post subject: Reply with quote

Ok.

Which object have SetMovementDisabled(true) in that video? All objects? Just the check points?
Back to top
View user's profile Send private message Send e-mail
rodri



Joined: 05 Mar 2005
Posts: 64
Location: Spain

PostPosted: Tue Aug 30, 2005 10:38 am    Post subject: Reply with quote

In the second video all the objects have movement disabled (except the car)
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    trueaxis.com Forum Index -> Bugs All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group