I looking through some old files I’ve downloaded and I found one called landscapetest.blend, so i opened it up.You control a jeep and ride around a landscape but one thing I noticed was that the skybox was parented to the jeep but didnt rotate with it.It just simply moved with it.
just rename the players name to Player and the skybox`s name to Skybox. it should work, havent tested
edit: and ofcorse make an object runn the script .(always sensor etatched to a controller. the controller should be set to Python. and in script: write the name of this script.)
to find an objects owner. you can use
oblist=GameLogic.getCurrentScene().getObjectList()
This function gets a list of all objects in the current scene. And to get a serten object inside this list you have to write this oblist[“OB”+“Object_name”]
cool he? . so you dont need to have a logic bricks connected to this script wwhen you run it in the game.
an_object=oblist[“OB”+“Object_name”]
own=cont.getOwner()
when you get an object inside the list you can use all the same functions on it as when you use the own. (example getPosition() or setPosition())
to see all functions inside an owner (or anny other moduele for example)
use this
print dir(own)
NOR.J, I tryed what you suggested but it didn’t seem to work, since I’m new python I don’t know what I’m doing wrong.Can you post a example of one?So I can compare of what you did differently.
Thanks in advanced
I also realised the set position could be really useful for inventory scripts
What’s vertex parenting, never heard of that, is it a new feature and where is the button for it?
Select both objects as you would for a regular parenting, then press TAB, select a vert, and press Ctrl+P. The object will follow the vertex without rotating with it. You can also parent to faces by selecting a aface instead of a vertex before parenting. That way, the object will follow the deformation of that face.