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

Pages: 1 2 [3] 4 5
PlayMaker Help / Re: int compare
« on: March 26, 2013, 02:20:20 PM »
Use "clamp" and clamp your value between 0 and 99 (every frame) :)

PlayMaker Help / Re: Swimming (forward movement in camera direction)
« on: March 26, 2013, 01:48:14 PM »
Image attached for solidarity. Found a solution after a millenia searching the dry wasteland of Unity Answers.

Cant say i 100% understand this, so could anyone more learn-ed offer an explanation, akin to one you would offer a child..

(it converts movementDirection to world space, relative to the cameras direction?)

User Showcase / Re: Chest Quest - 7drl
« on: March 26, 2013, 11:25:10 AM »
Good start :)

Click on your texture images, then in inspector view change them to "point" type, which will stop mipMapping (blurring textures when they're at a certain distance).

Go into your input settings and on your vertical/horizontal axis, make the sensitivity much higher, and the gravity around 0.4-0.6.

This will give you more satisfying, responsive movement.

User Showcase / Re: My game.
« on: March 26, 2013, 11:19:18 AM »
Looks great, love the start menu and gun-voice announcements. I also really dig this 90's sci-fi vibe.

Could use crouching for ducking behind waist-high walls/stealth, which could double as a roll when sprinting so you can evade fire.

PlayMaker Help / Re: Get Next Child finishes on first loop
« on: March 26, 2013, 11:08:46 AM »
I remember having issues with get next child, so i just programmed the searching myself for a quick fix.

- on first state it gets "#children the object has"
- then it checks child by "index number"
- check if this is this the right child we're looking for?
- increments "index number" by 1
- if "index number" = "#children the object has" then object doesn't have the child
- if "index number" < "#children the object has" then go back to start of state because there's more children left to check

Hope that helps.

PlayMaker Help / Re: swimming
« on: March 26, 2013, 11:01:33 AM »
I am not sure I follow why you want to move relative to the camera?
 to apply "sinking", you don't need to edit the gravity, instead simply apply a down force

Hi Jean. I still want the camera to follow the player. Moving relative to camera direction would mean that holding forward = you swim where you are facing (Z-direction of camera), so you could swim up/down smoothly.. this is how it works in any FPS game like Half Life/Unreal.

I have the "VerticalSpeed" of the player grabbed at all times, so interpolating that to a "sink value" of say.. -2, would mean that if you jumped into water from a high ledge, you'd have the feeling of water resisting your fall as you sink, and if you dropped into it from a ledge level to the water, the water resistance would feel less severe and smoother.. imitating real water resistance physics.

PlayMaker Help / Re: World Bounds, resetting player to 0,0,0
« on: March 25, 2013, 05:18:09 PM »
You could have the level/world move past the player, creating the illusion that the player is moving :)

PlayMaker Help / Swimming [Solved]
« on: March 25, 2013, 05:15:53 PM »
I have a FPS player who moves via: "get axis" and "controller move"

Whilst swimming i want forward movement in the cameras direction, using controller move on the player.

Ideas? Seems kinda tricky.

[EDIT] solution at end of topic :)

PlayMaker Help / Re: Jumping!!!
« on: March 25, 2013, 08:39:51 AM »
- Get the vector3 you're using to move your controller each frame
- If grounded and spacebar is pressed, set the Y value to -jumpHeight
- otherwise set the value to your gravity amount (20)

^do this with "convert bool to float", and set your Y amount according to whether jumpKey is true/false

If grounded you'll likely need to set gravity to 0.001 which solves a "grounded?" issue with unity controllers

PlayMaker Help / Re: fixed update
« on: March 21, 2013, 07:32:10 PM »
Make sure the filename matches the new class name.
Then change OnUpdate to OnFixedUpdate.

Which actions are you changing? I'd like to add this option to the official actions where it makes sense...

Cheers Alex!
float add, float operator and controller move

PlayMaker Help / fixed update[SOLVED]
« on: March 18, 2013, 12:39:44 PM »
I need to make duplicates of a few actions and edit them to be fixedUpdate instead of Update (for character movement acceleration/deceleration)..

Whats the safe way to do this?

I tried copying the action.cs in the folder, then editing the name/class name and bit of code in notepad, but unity started freaking out. A simple step-by-step would be appreciated.

PlayMaker Help / Re: 2d character control utilising itween?
« on: March 14, 2013, 10:38:18 AM »
Well, i would:

- use some variables "x velocity", "z velocity" for moving the character (floats)
- clamp velocity variables to your "max speed" (like.. between -10 and 10)
- when key is down you add/subtract to each variable by "acceleration" (float variable) - higher value, faster the character will get up to max speed
- multiply velocity variables by "de-celeration", which would be a value between 0 and 0.99 every frame, lower the amount - faster the character will slow down

You can alternatively play with gravity/sensitivity in your input settings, which is far simpler but not as flexible.

PlayMaker Help / Re: change variable in a script
« on: March 11, 2013, 07:45:03 PM »
bump, to hopefully work on this tomorrow

PlayMaker Help / Re: Creating AI with Patrol
« on: March 11, 2013, 07:40:34 AM »
I'd have a string switch, and only do waypoint wandering if the string = "wandering".. and have the state manager change the string according to the state.

PlayMaker Help / Re: popup menu appearing over objects...
« on: March 11, 2013, 07:36:04 AM »
Not sure why GUI elements wont work for you, but you can read this:

the part about "depth only", so you can have a seperate camera that follows the main camera, and have it only render your GUI elements, and render them first.

Pages: 1 2 [3] 4 5