Sign in to follow this  

Newton collision problem

This topic is 3744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

hi, I want to determine if my player gets hurt im a collision. I think that i could get the diferences when my player push an object or when a object hits my player by the angles of the directions vector. But i dont know how to get the directios of the objects, and i dont know any other way to solve this. Any idea? Help please. Thanks in advance.

Share this post


Link to post
Share on other sites
Quote:
Original post by glmisscelan
hi,

I want to determine if my player gets hurt im a collision.

I think that i could get the diferences when my player push an object or when a object hits my player by the angles of the directions vector.

But i dont know how to get the directios of the objects, and i dont know any other way to solve this.

Any idea?

Help please.

Thanks in advance.


Set the material callbacks; use the process callback to get the velocity of the impact (other 2 do not indicate that a collision has occurred, only that a collision may occur).


void NewtonMaterialSetCollisionCallback(
const NewtonWorld* newtonWorld,
int id0,
int id1,
void *userData,
NewtonContactBegin beginCallback,
NewtonContactProcess processCallback,
NewtonContactEnd endCallback)

dFloat NewtonMaterialGetContactNormalSpeed(
const NewtonMaterial* materialHandle,
const NewtonContact* contactlHandle)

dFloat NewtonMaterialGetContactTangentSpeed(
const NewtonMaterial* materialHandle,
const NewtonContact* contactlHandle,
int index)

Share this post


Link to post
Share on other sites

This topic is 3744 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this