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 - JonathanBurroughs

Pages: 1 2 3 [4] 5
Playmaker Help / [SOLVED] Raycasts
« on: April 02, 2014, 04:08:01 PM »
Hey all,

I'm getting some strange behaviour where no matter what object I try to emit a raycast from, nothing seems to be emitted.

I've boiled it down to an empty dummy object with a single FMS and a single state. The state is just the Raycast action calling every frame emitting 100 units from the position and rotation of the object.

I've switched the debug ray on, but I don't see it in either the Scene or Game viewports.

Is there an upper limit on how many simultaneous rays which can be cast? I have some Mouse Pick events going on elsewhere in the scene, so could they be competing?

This query is really an extension of my other post, but I felt I'd perhaps deviated from the original topic:

Playmaker Help / Re: Locking mouse cursor to centre of screen
« on: April 02, 2014, 03:26:09 PM »
Ah, found the Repeat Interval field on the Raycast action, so I don't need the self-triggering event.

Even so it's not working for some reason. Although I can't see why. I've switched on the debug view of the raycast and can't see the beam leaving the camera. So I suspect I've done something fundamentally stupid.

Playmaker Help / Re: Locking mouse cursor to centre of screen
« on: April 02, 2014, 03:09:13 PM »
Here is what I'll attempt as a first stab:

- FSM on player camera has an event which fires a ray
- Ray detects the target gameobject and declares it as a global variable
- Event waits a short while (<0.1s)
- Event self-triggers

Any interactive gamobjects can compare themselves to the global variable. If they're the same and an action button is pressed then magic can happen.

Similarly my GUI system can evaluate the global variable to see if it should draw the standard or interactive target reticule.

Playmaker Help / Re: Locking mouse cursor to centre of screen
« on: April 02, 2014, 02:52:47 PM »
Ah. Actually this raises a broader question.

The Raycast action can't be toggled to call every frame. What is the best practice way to make it do so using states and events?

At first I thought I could just fire a ray whenever an action button is pressed, but ideally I'm going to want to be able to check the hit object every frame so I can do things like modify the target reticule appearance to indicate when an interactive object is targeted.

Playmaker Help / Re: Locking mouse cursor to centre of screen
« on: April 02, 2014, 01:57:19 PM »
Yeah, perhaps that's best. I'll swap out my Mouse Picks for Raycasts.

Playmaker Help / [SOLVED] Locking mouse cursor to centre of screen
« on: April 02, 2014, 11:55:44 AM »
Hello all,

I've taken a look at this thread here:

Following it's instructions I've run Set Mouse Cursor at the start of my game to hide and lock the mouse cursor.

However I'm still finding the mouse cursor drifting around in the scene, which makes using Mouse Pick tricky.

Ideally I want the Mouse Pick origin to be the screen centre, to align with a fixed screen position targeting reticule.

Is there a way to set this up?

General Discussion / Re: Playmaker logo
« on: April 02, 2014, 10:11:07 AM »
I concur!  :D

Playmaker Help / Re: Activate/Deactivate Objects
« on: April 02, 2014, 09:18:46 AM »
I only discovered this yesterday, Rabagast, so I'm super happy to share the knowledge.

What you want, I think, is "Set Property".

You can specify a specific component if you wish. For example I turn FSMs on and off within my Player object, but leave things like the Mesh Component and Physics components switched on.

You can go even further and manipulate specific Inspector entries. It's super powerful.

In fact as a shortcut you can just drag objects from the Hierarchy or components from the Inspector directly into a state and playMaker will automatically suggest using Set Property.

Hope this helps!

General Discussion / Re: Playmaker logo
« on: April 02, 2014, 09:03:42 AM »
This is a good question, DaiDesign.

I'd like to credit playMaker in any commercial products I release, so the rules for appropriate use would be good for me to know too. Also for promotional material. I admire it when developers are humble enough to acknowledge the technology they used to create their work.

Links to official logo assets would be awesome too!

Right now I don't even know if I need any systems complex enough to warrant a third party GUI solution. But even so both Daikon Forge and NGUI are looking mighty appealing, if just to play about with.

I see both have long-standing playMaker support. But which is best?

I appreciate "best" is hard to define, so I'm most interested in just person opinion. Which has been the easiest to pick up? The most flexible to use? Has offered the most powerful solutions? Which is best supported by playMaker?

Anything which can influence my thinking would be most welcome.

That did the trick!

Stuck a Vector3 Clamp Magnitude in the player movement FSM. All is well.

Thank you so much, jeanfabre.

Ah, sorry. I maybe confused the matter in my original post.

Here's an explanation by example.

If I hold the "D" key to move horizontally right I cross 10 Unity units in 10 seconds. If I hold the "D" and "W" keys, to move diagonally left and forward, I cross the same horizontal distance in half the time; 20 units in 10 seconds.

It's as if the forward component is being added to the horizontal somehow.

The same is the case in the other axis too. If I move forward and then add a horizontal component, my forward movement rate is doubled.

Solved it with this video:

I didn't fully appreciate you could just duplicate the axis entries in the Input Manager. All I had to do was create an additional Mouse X and Mouse Y which were configured for 4th and 5th joystick axes respectively and it all works beautifully.

Strangely this isn't the case when I use the Xbox Controller as input, only with keyboard input. I shall investigate further.

Hey all,

Does anybody else find that if they use Get Axis Vector to drive their character movement, that when both Horizontal and Vertical inputs are used (say to move diagonally) that the two are combined, so you end up with diagonal movement being twice as fast as either component independently?

Is there a known solution to combating this?

Pages: 1 2 3 [4] 5