I am building a game and have a character who rides a bike. I want the camera to follow this character, so I parented the camera to him. But it seems that when I look through the camera’s point of view, my character turns invisible and everything renders in a strange way, if it renders at all.
I have 2 sensors. The first checks if the character is nearby the sensor and the second one checks if the “Space” key is pressed. Those two sensores are activating a sound file. The problem is that I have to hold the key for when I release it, the sound file stops and does not come to an end.
Here is the link to the file:
For your camera question,
Don’t use parent, try the camera options from the logic bricks
with camera selected (do not use parent)
Always(sensor) -> And(controller) -> Camera(actuator)
its asking me for some kind of code befor i can download your file so…
my best guess:
1Where is it in comparison to your character? Is it behnd something(that you dont notice in , say, wire view.
2Are you in textured mode?
Sound: How do you have it set up to play the sound file(loop stop, loop end) And do you ave pulse mode selected in your keyboard sensor?
Thats all I can think of coming from a mostly intermediate GE user.
Can we get someone more experienced here? Oh, and a hint, always post screenshots, just so we can see your camera, logic brick setup.
Your file is a mess…
You’ve forget to pack the file, no sounds, no images…
Delete the camera
Add a new one behind your character, near it
As Appolonius said, use the Camera Actuator
The sound…bad/weird bricks setup I guess
if i do the camera actuator, the camera simply crashes into the character.
You forgot to apply scale and rotation to your models (CTRL-A) before you parented them to other objects. This is very important for the game. If you plan on having your rider jump off the bike it would be better to use a python script to replace the bike and rider with two separate objects. That way you can set up a bounding box around the bike and rider as one mesh and animate it.
You also forgot to hit the little package picture next to the sound and pack it.
If I’m honest it looks like your fairly new to the game engine and this project may be a little beyond your ability quite yet. I think you can do it but you are going to have to do some study. Look through the forum and get a feel for the game engine some more. Here are some good places to start filling in those holes in your ability.
Hope this helps. After you look through this stuff go through the stickys. Good luck, if you have more questions post them here.