How can I use the visibility actuator?

Hey guys, I´m a noob in blender so I need some help if you have some time…Please!
The thing is I´ve made a house. To make the fps go higher, I need to make some objects invisible when I´m not in the room, and make them visible as soon as I got there.
I´m using:
near / and / visibility
But I do not know how to make them appear and disappear. I´ve been using an empty and the children property but I have no success.

Please, need help!
D:

Thank you

Make it so that when the player is within a certain radius, make the object visible.
When the player is within a farther radius, set it to invisible by deselecting the “visible” button on the actuator.

If you need further clarification, just let me know, and checkout my youtube channel for blender tutorials. :slight_smile: I currently
have a character logic tutorial and a blender 2.5 basics tutorial. For this weekend I’ll make a level design tutorial.

If you’re interested here’s the link: http://www.youtube.com/user/d123s404?feature=mhum

Hi, thanks for your answer!
I already done that and doesn´t seems to work.
May I use one or two sensor (near) for that or just one?
I need to appear and disappear.

Do you have a tutorial step by step to do that??
I´ve been trying for the last three days.

Thanks!

Someone help me pleaseee

If you want to work with rooms, it might be much more efficient to use occluders. Just google for occluder+blender
An other way is to use a separate scene for the room. So you can remove the “outdoor” scene after entering the room.

What you want is a LOD. It is partly possible with logic bricks but very inefficient.

It is much better to go with python. For some ready to use solutions, search through the resource forum for LOD threads. I think the game engine resource section of the wiki.blender.org contains some links too.

Hi, thanks for you answer, but I do not need LODs because the rooms are very small, I just need the objects to disappear as long as I´m not in that room. I searched for occluders too.
I´d read that the better way to do what I´m trying is with visibility. For example, the objects in the room linked (children) of an empty or a invisible box (I think any of those 2 things should work) and I assign the visibility with the children option to that parent.
That´s the general idea I have, but I cannot get it to work, and I´ve been googling for 3 days more or less, and I cannot find the solution.
Any good tutorial of Near + visibility??

Thanks

(I will search anyway in the game engine section)

Hide.py


import GameLogic

def far(cont)
  near = cont.sensor[0]
  own = cont.owner
  lastVisibles = own.get("lastVisibles")
  if lastVisibles is None:
    lastVisibles = []
    own["lastVisibles"] = GameLogic.getCurrentScene().objects

  hideOldObjects(lastVisibles)
  showNearObjects(near, lastVisibles)

def hideOldObjects(lastVisibles):
  for obj in lastVisibles:
    obj.visible = False
    lastVisibles.remove(obj)

def showNearObjects(near, lastVisibles):
  for obj in near.hitObjectList:
    obj.visible = True
    lastVisibles.append(obj)

Near sensor -> Python Module: Hide.far

if you enable True pulse with a reasonable long delay (10-120) it should run reasonable efficient
(BTW: This is just typed down and not tested)

wow you are really a monster hahah
thanks!
I´ll see if I can make it work!

Does the module controller allow you to activate only defined functions without running a whole script? That would be awesome, if my code was neat, that is… :o

Also, using the invisible actuator will only disable the drawing of an object, but physics are still calculated… so you may not overcome affect the performance as much, ofc, you’d be unlucky if it didn’t get rid of some rasterizer hog… (less materials)