Jump to content
  • Advertisement
Sign in to follow this  
glmisscelan

Newton collision problem

This topic is 4102 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
Advertisement
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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!