I have never really used the game engine before, but a client of mine needs a model of a map I made to be interactive. I just need the map to float in empty space and somehow be controlled to rotate around.
I would really like to make some on/off switches for objects placed on the map too if that’s possible. Can anyone tell me how hard this would be or give me some way to get started?
Sorry for my ignorance, I’m just in a hurry and need it done in the next few days, I’m pleading for help!
I’m asking if all of that is possible and if anyone knows of any good tutorials for such things. Why would I have a .blend for it if I don’t know how to do it…? I could post a blank file if that helps you comprehend things.
I can think of an easy way, assuming the map is all in one .blend:
If there are multiple parts to the map, parent them all to an empty wherever you want the center of rotation to be.
On the empty, attach some keyboard sensors and movement actuators to rotate it.
This may be a “duh” thing, but make sure you have a camera in the scene, with the visibility distance set so the whole map is in view.
You can also put keyboard sensors attached to object visibility actuators on the things you want to turn on/off… altho it may be better to make the keyboard sensors toggle a property, which then turns vis on/off. The same thing can be done with the rotation, just make the movement be dependent on a property, and have the key press toggle it to start and stop the rotation.
I do this all the time when I want to see how something I’m working on looks from all angles in the game engine. Rot 0.01 on all three axes works great for that. For yours just do the Z axis of course. Might have to play with the values, because at a scale around the size of the default grid floor, anything over 0.05 seems REALLY fast to me
Here’s a python script I whipped up that allows you to move the object with the mouse and a variable speed. It just rotates around the Z axis, but it sounds like that’s all you need.
If you put those exact logic bricks with the same names on your object you want to rotate, and put the script in your .blend file also, you should be able to make it work.
One thing to remember: Be sure that you can render your map in realtime. There are some modeling features that can’t be used in the game engine. Also make sure there’s not too many vertices on it.
What’s the deadline? Could you post your map and the different sectors? I can help you, like I do a simple orbiter and then explain to you in a different file.