Bonsai Posted August 16, 2014 Share Posted August 16, 2014 Hey Peeps, I was playing around with colshapes, and I noticed colshapes only seem to detect hits, if the center of an element enters it. Like, if you drive in a colshape, and only the first part of the vehicle is inside, the hit won't be detected. Is there some way to make it detect even a slight hit? Bonsai Link to comment
arezu Posted August 16, 2014 Share Posted August 16, 2014 I think you have to make your own colshapes for that, to check for shortest distance from a colshape to a cuboid. Link to comment
ixjf Posted August 16, 2014 Share Posted August 16, 2014 I assume that if you compare 3D positions between that collision shape and the vehicle's collision shape (see getElementColShape), that'd work. I wouldn't trust isElementWithinColShape to check if it's actually within the collision shape because it most likely also works the way you described above. Link to comment
tosfera Posted August 16, 2014 Share Posted August 16, 2014 I think you get it all wrong, it's something that has been made by GTA ( or MTA, not sure. I guess they didn't change this! ). The models of a vehicle isn't getting touched by an element ( not the 'bounding box' ). The thing that is being hit is the center of a vehicle. The player is there, so once the player hits the vehicle hits the colshape. There are some work-arounds for that. But tbh, it's not worth to make. Takes quite some time and is overrated. What are you trying to do anyway? Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now