0
$\begingroup$

Ex. You want to move your character to coordinate 0,-10,1 but you don't want to add location normally. When you touch an item, i want to SET the position to those coordinates. The motion actuator can't do it even though character motion has a SET setting that doesn't work correctly. What should I type for Python to achieve this? Also, is it possible to set an object's location to match another object's location?

$\endgroup$
0
$\begingroup$

You can set the location like this:

object = bpy.data.objects["Cube"]  # for example
object.location = ((0,-10,1))

or

object.location = bpy.data.objects["Sphere"].location

to match this objects location to the one of i.g. a sphere in your scene.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.