Is it possible to set the Angle an Dist Values with Python? I haven’t found a Function to do that.
What do i get with “RaySensor.getConeOrigin()”? I get a List with three Values, what does they mean?
Thanx, Doc
maybe
Radar
sense.getConeHeight
getConeHeight()
Returns the height of the cone with which to test.
sense.getConeOrigin
getConeOrigin()
Returns the origin of the cone with which to test. The origin
is in the middle of the cone.
sense.getConeTarget
getConeTarget()
Returns the center of the bottom face of the cone with which to test.
maybe not (that is the docs from 2.23)
(check the game engine docs on blender.org)
would that not be the x y z coordinates of the center of the cone?
Ah! Yes, i’ve tried it. Origin is the Centre of the Cone and Target is the Centre of the Bottom-Face of the Cone. All in Global Coordinates. I don’t know what i can do now with this knowledge, but maybe it’s useful sometime.
To bad that there is no Way to set this Values with Python.
Thanx z3r0 d.
Ray sensors have some usefull functions too.
Ray
getHitNormal()
Returns a list representing the normal at the face that was hit.
Returns [1.0, 0.0, 0.0] if no face was hit. (What?!)
getHitPosition()
Returns a list representing the nearest position where the ray intersects a face.
Returns [0.0, 0.0, 0.0] if no object was hit. (Huh?!)
getHitObject()
Returns the name of the nearest object intersecting the ray.
Returns None if no object was intersecting.
getRayDirection()
Returns a list representing a vector describing the ray’s direction.
(No negative return value, since the ray always has a direction.)
Since some of the functions return incorrect values if the ray sensor is negative, always check with isPositive() whether the ray intersects any objects.
We should start a logic bricks thread, that tells how each logic brick works, gives all the functions each logic brick has available, and describes all it’s little quirks. I know what it’s like to discover one of those “little quirks” when you weren’t expecting it…