How to calculate rayToWorld for rayTest knowing rigid body

Post Reply
svedach
Posts: 12
Joined: Mon Sep 01, 2014 6:53 am

How to calculate rayToWorld for rayTest knowing rigid body

Post by svedach »

Good afternoon. Doing an imitation of the ultrasonic range finder. To measure distance using rayTest. The housing rangefinder - a rigid body with respect to which the measured distance. As rayFromWorld use Body-> getCenterOfMassPosition (), and how to calculate rayToWorld not understand.
he3117
Posts: 2
Joined: Sun Sep 21, 2014 8:03 am

Re: How to calculate rayToWorld for rayTest knowing rigid bo

Post by he3117 »

If I understand your problem correctly you want to measure the distance between your object or a point and other objects in the world.I'm new to bullet physic but in other engines to solve such problem we uses shape casting to find nearest point of object to a specific point in world.some times ray casting to the center of objects do not return the nearest point of that object.
Post Reply