Align axis to vector degrees

Align axis to vector if a sphere is 360 degrees else do nothing.How would i do that?:confused:

Learn python and do it.

Also, what do you mean by “if a sphere is 360 degrees”
I think spheres are always “360 degrees” otherwise it wouldn’t be a sphere.

Rotate 360 degrees and stop.

If all you want to do is rotate the sphere by 360 then you can animate it to do so.

How would you program align the axis of a cube to vector of a sphere that rotates 360 degrees if it is not 360 degrees it would nt do anything?That is what i meant.

Is this the wrong place to ask a python question about my program in python?I will copy and paste and put it in code tags if i can sdfgeoff.

This is the place to ask!

Out of interest, what is this script for? What do you want to do?

I want it to ask a question about what its name is and if you got it wrong it will say that is not my name and
if you have it right it will say that is my name.You want to see the code.I actually looked on youtube
and modified a code from a tutorial from there.

Is this a riddle? I think people are having a hard time understanding what it is you are looking for. I have no idea what you mean. Try and rephrase your question and maybe someone will be to help once they understand.

Post up some code, maybe the code will speak for itself.

Heres my code.



n = int(input("What is my name choices are bill,sarah,sam,david: "))

 
if n == Sarah:

 
       print("That is my name")

 
else:

 
       print("That is not my name")

Not wanting to sound rude, but how does your code relate to Align axis to vector degrees?

It is a python code it does not.

So you’re demonstrating that you can learn python?
Good. You’re willing to learn (or have learnt to copy-paste from the web)

The next step is to look at the Python API for blender.

There are several standards that most people use. For example, at the beginning of each script:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner

Then you can access the logic bricks connected to they python controller through the “cont” variable, and you can access the object owning the script through the “own” variable.

So say I wanted to find the position of the object. I could use:

import bge

cont = bge.logic.getCurrentController()
own = cont.owner

pos = own.worldPosition()
print (pos)

Or maybe the objects rotation with:

rot = own.worldRotation()

Well, that’s OK, but from what I understand of your question, you want to use the “track to” actuator.
So we can get the actuator with:

trackTo = cont.actuators["track_to"]

(make sure the actuator is called “track_to” check capital letters)
Now we can change several things on the actuator, like what it’s tracking to:

trackTo.object = "Sphere"

That will make it track to an object called “Sphere”

Then you must activate the actuator:

cont.activate(trackTo)

There you go, if you run the script when it’s attached to a track to actuator it changes the object it’s tracking to.

Did the python code i posted in code tags work for you sdfgeoff because it didnt work for me?What did i do wrong?I am using python 3.2.

That code will work in an external python IDE, but in blender the command “input” does not work. This is because the input command “listens” and prevents the code from running until it has finished “listening”

Also, you convert the input into an integer, and then compare it to a string. Get rid of the “int()” command.