1
$\begingroup$

I am trying to make an object rotate based on its position. Basically the Y-angle

gamma = arcsin(var)

where var is the driver variable connected to the x-location of the object.

The only problem is that blender does recognize sin() but neither asin() nor arcsin(). According to the documentation of 2.79, asin() should work.

Is this a missing feature or has it changed in 2.8?

EDIT: If this is missing, would a taylor series of arcsin work? I could imagine that that would significantly decrease performance.

$\endgroup$
  • $\begingroup$ If it's featured in the documentation but not working, either the documentation needs to be updated, or more likely: it's a bug. Either way, I would file a bug report. $\endgroup$ – Mentalist Jun 6 '19 at 3:18
2
$\begingroup$

Domain Error

My suspicion is rather than asin being unavailable, you are getting a math domain error.

in python console

>> "asin" in bpy.app.driver_namespace
True

>>> bpy.app.version
(2, 80, 74)

Indicating the math.asin(angle) method is known to driver namespace. Would seriously consider not filing a bug report re it missing

To test have typed #asin(frame) directly into x location of an object (frame , also in driver namespace, is current frame)

enter image description here

and as expected at frame 1, returns $\pi/2$ (or 90 degrees).

Remember the values passed to $\arcsin(x)$ need to be in domain [-1. 1], hence if i change to frame 2

ERROR (bke.fcurve): ../fcurve.c:2084 driver_evaluate_simple_expr: Math Domain Error in Driver: 'asin(frame)'
|improve this answer|||||
$\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.