0
$\begingroup$

I have animated a torch and added the text "torch" in the end which only becomes visible when the torch is in the center of the screen. I've used both the eye and the camera in the restrict viewport visibility to make the text appear. When I play the animation with the Animation Player, it works perfectly. In game mode (P), the animation is triggered by a mouse click on the torch. Everything works fine apart from the text which is not visible. What am I doing wrong?

I have already checked the action brick and the settings are fine.

Here's a video: http://dropshots.com/miracleshappensgoogl/date/2017-05-04/19:20:07

$\endgroup$
6
  • $\begingroup$ What you are asking will lead to guessing the answer. please share some screenshots and/or a blend file with the minimum to reproduce the problem. $\endgroup$ Commented May 4, 2017 at 21:43
  • $\begingroup$ Ok, I added a video. I wanted to do it yesterday but the connection was really bad: I'm in Cambodia! $\endgroup$ Commented May 4, 2017 at 23:38
  • $\begingroup$ For the brick logic, I have used: ALWAYS + AND + ACTION (I selected the animation and set the START and End frame). The action is triggered by left clicking on the torch. $\endgroup$ Commented May 4, 2017 at 23:39
  • $\begingroup$ Hey, I've found that text does not appear as clear as in the 3d View when you are in the engine. Usually I have it transformed to mesh or tested it a bit (size,textures,materials etc.). Some times they appear different size than what you intend or in different positions. I didn't give you an answer, just a simple imput. Try making the text a mesh though, and see if it works. $\endgroup$
    – Lev
    Commented May 4, 2017 at 23:51
  • $\begingroup$ Yes, I've already done that but it didn't work out - sorry I didn't mention it in my question but thanks for the effort. $\endgroup$ Commented May 5, 2017 at 12:00

2 Answers 2

1
$\begingroup$

The BGE plays animations different then Blender is doing. Not all channels are supported.

The BGE does not support the "Restrict View" animation channel (nor "Restrict Render", nor "Invisible (Material Game Settings)", nor "Transparency" ).

You can change the alpha of the material. But this is not that easy with text objects as they are special object.

A possible way is to toggle the visibility via visibility actuator. You can also change the content of the text object on the fly by setting the "Text" property.

Remarks: When this is aimed for a game or an interactive presentation it might be worth to isolate the text from animation. E.g. A single text object that shows the description of the currently selected object. (This requires more thoughts on the design and is outside of the scope of this answer).

$\endgroup$
1
  • $\begingroup$ Thank you! I had no clue. I also tried to convert the text to mesh with Alt+C but it didn't work. I'll try to change the alpha and see what happens if that doesn't work then I'll use the visibility actuator. Thanks again! $\endgroup$ Commented May 5, 2017 at 11:58
0
$\begingroup$

SOLVED! Thanks to Strapicarus and Monster for pointing to the right direction.

The greatest help has come from a tutorial by Arsenal RSL Tutorial,

However, I have discovered something really important.

You can only add 1 single animation at a a time in the action actuator so I added another one and everything is working fine. I suppose that if you have a lot of animated objects in a scene, you just have to add an actuator for each animation. In my case I only have two: a torch and a text. enter image description here

The names given for each animation may be confusing, especially the first one (Text_Torch) because in my first attempt the animation of the torch and the text were together. However, if you are animating in cycles or render there is no problem: you can animate as many objects as you want.

The game engine requires you to add one animated object at a time.

I hope this helps others as much as it helped me!

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .