Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - fuzzywobs

Pages: 1 [2]
PlayMaker Help / Raycast Gameobject Compare not working correctly.
« on: June 23, 2015, 08:43:36 AM »
I'm struggling with something that was not an issue before (pre Unity 5.1?). Raycasting seems to be completely unreliable for some reason with the Equal Event and Not Equal Event not working correctly.
I have a raycast set up on my FPS controller with a gameobject global variable. I want to set it up so that if the raycast strikes a certain object, that object will change colour. If the raycast is not hitting the object, it returns to the original colour.
The thing that is most unreliable is the "Not Equal Event". There are some clear cases where the raycast is no longer hitting the object, yet the object stays highlighted and stuck in the FSM. When I've tested it, going horizontally through an object seems to change it back and forth correctly. When looking up and down the FSM seems to be stuck in the state that has "Equal Event" when it clearly is not. Sometimes shaking the mouse seems to resolve it.

Anyone any ideas?

I managed to get the desired effect before I just cant replicate it anymore (I must have gotten lucky). When I did get it I did use global variables.

I'm just a bit confused as to how to set it up. I tried storing the characters position and location as a global variable, and have the camera LookAt these but that didnt work.

Any ideas?


Anyone? I feel this should be a really simple solution!

User Showcase / Re: Gynophobia (PC, MAC)
« on: June 02, 2015, 02:02:41 PM »
Congrats on the release! What plugins did you use for the enemy AI?!

PlayMaker Help / Re: best way to set up ai with photon ?
« on: June 02, 2015, 06:50:30 AM »
Did you or anyone else figure this out?

I'm, trying to integrate LookAt in my game and have so far been unsuccessful.

In the game the character runs around and the player views him from a distance from a bunch of different fixed cameras scattered around the level in different rooms. When the character walks to a certain area/room, he triggers an event which causes the current camera to deactivate and activate the next one as to have a better view of him. So far I have achieved this. However, I want the camera that activates to be focused at on the character either at all times or at least to start off with. This is because I do not know exactly where the character is going to trigger the camera switch so it cannot be preset, I need the camera to be focused on the character.

I managed to achieve this before, but since I restarted from scratch I can no longer get it to work.

I think it hast to do with setting the characters position as a global variable and have the LookAt vector set to this position, but I cannot seem to get it working.

Any ideas?

My character is controlled via third person cameras (several oculus cameras) and when the character gets to certain areas/triggers, the different corresponding cameras activate/deactivate to ensure a constant good line of sight.

So far I have everything running ok-ish. However, one issue I have is that when the camera changes (when a new one activates) it always seems to be pointing in a random location (depending on where the player happens to be looking at that moment in time) and it takes a few seconds to even find where the character is by looking around.

What I am trying to do is that when the camera changes, the camera that activates always starts off on a position that is looking right at the character, regardless of what direction the player is looking.

So I have been experimenting all day and have come close many times. However I tried to restart from scratch, and now I cant even achieve what I managed to achieve earlier! I feel like I'm having a brain fart!, and its very frustrating!

The way I was trying to achieve and had gotten most of the way there (and now I can recreate ) was using the following method:

1. Have all the cameras be forced to "" the character at all times.
2. When a camera is activated, the script on that particular camera forcing it to "" the character is disabled after one frame.

This should cause the camera to start off looking at the character, and after one frame allowing the player to look whereever they want.

I'm just struggling to force the camera to look at the player. It is really rage inducing knowing I achieved it earlier but cannot do it anymore.

Why do you need to raycast to the background?

I've done something similar. I raycast on an interactive layer, when I hit something I store it, then change the color of the stored object just as you're doing but..

I gave each button an FSM and global event for when it is hovered. When the raycast connects then it stores the gameobject, but I send the event from a Game Object Changed action instead of the raycast so it loops back into the raycast and waits for the connecting object to change then sends the hover event to it when it does.

Might be worth trying something similar. The downside is having an fsm and event for mouseover on each individual button but that does also convey a lot of flexibility as well, rather than just saying whatever the ray hits will change material color.

Lane (or anyone!), could you expand in more detail how you did this? I'm not sure I fully understand global variables and how to get it working.



I managed to figure out how to use the global event and used the method you suggested Lane. I can now highlight and unhighlight to my hearts content.

The next step is not working though. What I've tried adding is if the game object is highlighted, AND you click space bar, the character contoller 1 is deactivated, and the character controller 2 is activated. However, in the editor it just seems to deactivate the character controller 1 without activating the character controller 2. While testing it out in the oculus rift, once i hit spacebar on the highlighted object, the game just freezes or hangs on the last highlighted view. The game itself doesnt actually crash, but the camera view is frozen. Any ideas?

Forum Suggestions / VR Help section
« on: May 12, 2015, 04:44:27 AM »
    On top of the existing sections:

    iOS Help
    Android Help
    Playstation Mobile
    Windows Phone

    etc, there should be a section dedicated to Virtual Reality (Oculus Rift, GearVR, Vive etc).

    Trying to find tips and help on VR seems to be very hit and miss. It would be massively helpful to have it all in the same section.

Sorry to be a noob, but how would one apply the workaround? I've tried adding the script to my character controller but it is telling me it needs to be dreived from a Monobehaviour.


Pages: 1 [2]