Howto create my own type of collision primitive?

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Howto create my own type of collision primitive?

Postby jiandingzhe » Tue Aug 16, 2011 2:27 am

I want to have "point collision" to drive flying bullets in my game, as single point collision would have the extreme computing efficiency. So how can I do that?
User avatar
jiandingzhe
 
Posts: 48
Joined: Fri Jul 08, 2011 11:21 am
Location: Beijing

Re: Howto create my own type of collision primitive?

Postby Julio Jerez » Tue Aug 16, 2011 9:27 am

A single point collision is a sphere with a very small radius.

the algorithm that newton engine uses to calculate contact point is based of objcet having a volume.
a point with zero radio have zero volume and the algorithm will fail since it will not be able toi cacluate the BRep structure.
you can use sphere with small radius.

I would not recomend using point as collision for bullets, a point is conceptually a small object, but if you represent it as a rigig body, it will be not diffrent than a Terrain, a collsion tree, or a Box.
It will get the same treatment. you are better using short ray cast.

a bullet can be simulated by tracing a short ray on the lengh of the distance the projetile can travel along it velocity.
Julio Jerez
Moderator
Moderator
 
Posts: 12426
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 0 guests