Memory Posted July 26, 2014 Share Posted July 26, 2014 (edited) Hello guys, how can I set rotation for colshapes? SetElementRotation didn't work. Edited July 27, 2014 by Guest Link to comment
WASSIm. Posted July 26, 2014 Share Posted July 26, 2014 why and how ? change rotation? you don't need it Link to comment
Memory Posted July 26, 2014 Author Share Posted July 26, 2014 Example, look to image, I want to turn the colshape on few degrees. I want make parking in the colshape. Link to comment
albers14 Posted July 26, 2014 Share Posted July 26, 2014 It automaticly calculate that when you insert the positions. Link to comment
WASSIm. Posted July 26, 2014 Share Posted July 26, 2014 i think you need to use: createColPolygon Link to comment
Memory Posted July 26, 2014 Author Share Posted July 26, 2014 It automaticly calculate that when you insert the positions. ? i think you need to use: createColPolygon Yea, I know about this, but it 2D Link to comment
MIKI785 Posted July 26, 2014 Share Posted July 26, 2014 No colshape is 2D... polygon can have as many points as you want. Link to comment
Memory Posted July 27, 2014 Author Share Posted July 27, 2014 Polygon is infinite upward, but I needn't it. Okey, back to SetElementRotation, why it doesn't work for colshapes, colshape is element. Link to comment
50p Posted July 27, 2014 Share Posted July 27, 2014 That's for simplicity of collision detection. It's easier to check if x < 10 and x > -10 then calculating the rotation and then collision. The colshapes are simple primitives (box, sphere, rectangle, etc.) It takes very little time to check if point XYZ is inside a box or rectangle, same with sphere; simply checking the distance between 2 points and comparing it with the radius of sphere. You can use createColPolygon and additionally, onColShapeHit check the Z axis. Link to comment
Memory Posted July 27, 2014 Author Share Posted July 27, 2014 ...You can use createColPolygon and additionally, onColShapeHit check the Z axis. Yea, I already thinking about it and probably will do so. Thank you 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