Page 1 of 1

Proximity sensor XYZ orientation

Posted: 31 Dec 2014, 14:55
by krzmi
I have a problem with proximity sensor XYZ orienation. When I'm adding new sensor its detection volume is directed along Z axis. Is it possible to reorient detection volume along other axis? All options in Edit -> Reorient bounding box menu are disabled. I can't also modify object geometry in Scene Object Properties dialog. Is there any other way?

Re: Proximity sensor XYZ orientation

Posted: 31 Dec 2014, 16:08
by Eric
why don t you rotate the sensor?

Re: Proximity sensor XYZ orientation

Posted: 31 Dec 2014, 18:04
by krzmi
rotating sensor rotates also its own XYZ orienation. Ray is still oriented along its Z axis

Re: Proximity sensor XYZ orientation

Posted: 31 Dec 2014, 20:30
by coppelia
Hello,

you can do following from a child script for instance:

Code: Select all

if (sim_call_type==sim_childscriptcall_sensing) then
	result,distance,detectedPoint=simReadProximitySensor(sensorHandle)
	if result>0 then
		local m=simBuildMatrix({0,0,0},{math.pi,0,0})
		detectedPoint=simMultiplyVector(m,detectedPoint)
	end
end
Cheers