here’s the video with the error
The cube have a ray sensor, then i use that normal to realign the object, but in some parts of the track i get the vector [0,0,1] when it should be something different, as you can see in the video.
i was thinking of using down side bumpers to detect collision, but i don’t know why when i link them to the cube they just stop detecting ground.
Any idea how to solve this?
or an example file using one object with external collision sensors
i guess its because the ray is too short, also i suggest you to use a sphere bound (if you are not using it now)
thanks cyborg_ar, but i tried putting 50 as range and still the same,and I’m using sphere bound. I now the problem its the normal, don’t know why.
here’s the file
if you want to see the cube go to the load script and comment the isVisible line.
You need to apply scale+rotation to each object (ctrl+a)
and also the ray is not hitting anything when you reach the object above the blue line.
The normal returns fine but the problem is you’re not getting the normal
scabootssca thank you, i don’t know why i thought that if the ray hit nothing it return [0,0,0] :spin: rreally stupid. I know over the blue line you get no normal because the uupper part its just to contain the car, the problem its below the blue line. when i apply scale+rotation i get the ray intersected by the ghost object inside the cube, and the cube start bumping, any idea how to solve that?
Im getting confuse because the ray.isPositive() its giving true when i go outside the plane, so maybe scabootssca you are right and im not getting the normal, but why im geting that the ray its activated.
OK i think i solve the problem, scabootssca you where right about the scale something was going wrong with that, and i remove the touch sensor because i really don’t need it because i already have the ray :eyebrowlift: 2 goodies for the price of one, and that solve the problem.