playMaker

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

Pages: 1 2 3 [4] 5 6 ... 19
46
PlayMaker Help / Re: Hash Table Proxy Prefill Type: MeshRenderer?
« on: September 28, 2019, 10:23:00 AM »
Hey! So here's what I'm doing: I'm dividing my game world terrain, custom-made in Blender, into a 20x20 grid of 250meter square game objects. And each cell is assigned a name like 11-15 or 1-18. As the player moves around, I have an fsm that gets the player's position, converts that into a cell name, then checks a list of hash tables (or array lists?) and simply enables or disables mesh renderers of the LOD0-3 meshes on the world cell game objects.

I currently have these game objects dropped into a hash table. (actually 20 "row" hash tables each with 20 column cell key entries.)

I COULD get the stored cell's game object, get its component, and disable its mesh renderer manually, but I was told that GetComponent was expensive, so running that 9 or 25 times (depending on number of LODS I create), every time the player walks 250 meters in a direction, seems expensive.

Otherwise, I COULD just enable and disable the world cell game objects entirely, but considering they often contain nav mesh data for far away characters, I feel I'd get the whole "nav mesh agents are no longer on a nav mesh" error.

Are you saying there's a better way to do this?

The whole point of using this simplified culling system, is that every frame the game doesn't need to scan 12000+ game objects (in my UN-decorated world map) to see if they need culling, but instead to do it based on a simple "where is the player" math operation. Potentially I could still use official occlusion culling inside that much smaller region, but the immediate area around the player will have far fewer objects to cull than, say, a random mailbox door 2 km away... plus another 400 static mail box game objects. I WISH the mega city "heirarchical culling" they used in that phone demo was a part of Unity, but I can't find it.

I learned the culling preparation was the big frame killer for me, by reading the profiler, and when I just disabled a bunch of the world, all of a sudden my frame rate was great again, so I came up with this idea to just have all far away map cells be simple 100 triangle, 1 material meshes, depending on LOD.

It's really weird because the  scene I checked the profiler stuff in, was using unity terrain and lots of grass, and I was confused by how non-performant the default terrains with sparse grass billboards, ended up being.

I'm making an open world game that has 90+ frames for VR, so I'm trying to improve performance a lot.

47
PlayMaker Help / Hash Table Proxy Prefill Type: MeshRenderer?
« on: September 27, 2019, 05:04:36 PM »
Hello. I am making a custom culling system and want to iterate through the _Landscape Cells game object root, getting each child, getting each mesh renderer component, and storing them in similarly-named keys in hash tables, to use for a custom culling fsm.

But I went to the Hash Table's prefill type and saw that Object is not an option like it is in FSMs. Am I missing something? I want to store a bunch of mesh renderer components. In a playmaker fsm array I can select Object, then select the Object Type, and find the Mesh Renderer component, but I can't do this for some reason in Hash Table Proxy scripts. Am I missing something?

someone told me to use GetComponent to get all I need and store them since GetComponent was expensive, but I'm not sure where the best place to store the MeshRenderers is. An FSM array?

I THINK i could add MeshRenderer into ArrayListProxy, and CollectionProxy, but in that one it says "public enum VariableEnum{ // WARNING: DO NOT INSERT ITEM: IT CORRUPTS EXISTING PROXIES SELECTION, only append

does that mean I can add entries but only at the end, rather than in the middle? or is "insert" and "append" some special script I have to make?

48
Action Requests / Array Add Difference/Shared
« on: September 26, 2019, 09:13:10 PM »
I want to compare two arrays A and B. Any entries contained in both, will be added to a third array C "Shared". Any entries that only one array B contains, will be added to a fourth array D "New Entries".

Perhaps these should be two separate actions instead of one.

49
PlayMaker Bug Reporting / GetComponent/SetProperty Causes EDITOR Lag
« on: September 20, 2019, 08:08:41 AM »
Area: Editor
Frequency: Always

1) What happened

As soon as I add any GET Component variable actions, performance slows to a crawl in that FSM. I fully tested and confirmed this, but I can report this somewhere else. The result, though, is that editing new state names, adding new states, etc. gets laggy in larger fsms, and having sub-graphs would help this. My brain goes SO FAST in empty fsms, and the fsms can keep up until I start adding GET FSM actions. Sometimes I make those states brown (poop) so I can go through and disable those actions while editing, then hopefully remember to re enable them before going into play mode. 

REPRODUCING:
The attached template shows this PERFECTLY. All you gotta do is enable or disable the GET FSM variable action, then type descriptions or create new states or label them, and there is lag for me.

I THINK it works with GET FSM VARIABLE as well, but not as extreme.

billsmithnine@gmail.com

Unity Info:
Unity Version: 2019.2.0f1
Playmaker Version: 1.9.0.p18
BuildTarget: StandaloneWindows

System Info:
OS: Windows 10  (10.0.0) 64bit
Processor: AMD FX(tm)-4130 Quad-Core Processor
System Memory: 32749
Graphics Device: NVIDIA GeForce GTX 970

50
Feature Requests / Collapsible Sub-Graphs
« on: September 20, 2019, 08:01:35 AM »
I'm very visual, so I don't pile actions into states to scroll through unless totally necessary. Being able to draw a square around a bunch of linear states (all with FINISHED as their only exit), and hit "collapse into a single big chunk", would improve editor performance for me.

I could probably save editor performance by combining all these states into one, and having a giant list to scroll through, but my brain has a hard time keeping track of all that. Scrolling lists totally blow, in a visual graph editor. I never want to see a list but want to be able to see all the pieces laid out on a table in a graph view like the main playmaker view like in the attached image. If Sub Graphs were implemented, being able to click the main big chunk to go into a clean sub-graph with JUST those states, would be very useful. Like how you can now click a prefab in a scene to go into a view with just that prefab, and edit just that prefab, save, and then go back out to the bigger scene view. If I ever change away from using playmaker, it will be because of the reduced performance from big FSMs without being able to do this.

This performance thing is a bigger issue now, because as soon as I add any GET or COMPONENT or GET/SET FSM variable actions, performance slows to a crawl in that FSM. I fully tested and confirmed this, and I've linked to that bug report below. The result, though, is that editing new state names, adding new states, etc. gets laggy in larger fsms, and having sub-graphs would help this. My brain goes SO FAST in empty fsms, and the fsms can keep up until I start adding GET FSM actions. Sometimes I make those states brown (poop colored) so I can go through and disable those actions while editing, then hopefully remember to re enable them before going into play mode.   link to that bug report: https://hutonggames.com/playmakerforum/index.php?topic=21108.0
Unity Version: 2019.2.0f1
Playmaker Version: 1.9.0.p18
I'll make a bug report about that one.

51
Feature Requests / Quick State Templates Radial
« on: September 20, 2019, 07:49:13 AM »
often I need, for example, a boolean to be set up.

a state that's cyan with a yes and a no event. inside is a bool test.

I want to hold the shift button or something, then this state pops up in a radial. I grab it, and it creates the bool and the state, and I drop it into the fsm. would save a lot of time.  off to the sides would be two more states, one that sets the bool to true, and one that sets it to false. boom, fully set up. I just gotta change the name from "generic bool name", and it's totally ready to use.

normal templates are too big and clunky compared to this quick action. I have to hunt through a big list of templates that way, and then accidentally replace everything and get mad, etc. At that point, just re-creating this yes/no cyan bool state is quicker. over, and over. Having a little customizeable radial with just a STATE template, would be super handy and save time.

52
thanks! where is this proxy located?

also, does this cover the second part, where I need to get and set the Y value of the cameras before transitions to prevent whipping/facing the wrong direction afterward?

53
When characters go into menus, the right thumbstick should no longer rotate the cinemachine camera. I want to therefore set the Max Speed for the Y and X AxisStates, to 0, then back to their normal speed upon menu exit.

I also want to set the Value for the X and Y axes as well to prevent whipping during transitions between cameras. (get current camera's y value, set target camera's y value to that, do transition.) currently it doesn't keep all updated in their rotation, so going into first person mode, THAT camera might be facing back the other way from the direction of the 3rd person camera, causing disorientation upon switching.

But I cannot find in the playmaker actions, or in Set Property, where to set the values or the max speed for the axis states. There's like a billion euler angles and local rotation and rotation variables, but none of them seem to correspond to what I need.

The actions need to work in FreeLook AND Virtual Camera components. In the Cinemachine FreeLook script, I've found where the variables are but don't know how to access them at runtime using playmaker:

[AxisStateProperty]
        public AxisState m_YAxis = new AxisState(0, 1, false, true, 2f, 0.2f, 0.1f, "Mouse Y", false);.

54
I have a game object variable, and I need to find out what its number is, under its parent. It has many siblings all of which have the same name ("entrance") and tag "Interaction Spot." The childs are all identical EXCEPT for their index number.

detailed explanation:
Under _Entrances game object, there are two roots called HomeExt and HomeInt. Both have their own set of game object children, all called entrance. When you click on any entrance child under HomeExt, I need to get that index, then get the child at the same index under HomeInt, and teleport you to that game object's location. This will smoothly allow players to teleport into and out of buildings by clicking any door or window.

This person requested this and another thing, and got the other thing, but not this one. https://hutonggames.com/playmakerforum/index.php?topic=4708.0


55
bump. does anyone how how to do this kind of conversion?

I'm thinking:
somehow get the world direction the player/bike is pointed. (?)
get speed float.
DO SOMETHING.
set final vector3 as a controller move vector.
what is the missing piece?

i want my character to continue moving in the direction the bike is pointed, regardless of direction the camera is facing, with acceleration being added or removed based on which trigger you're holding. (basically i want to build grand theft auto vehicle controls.)

56
how do I add a speed float to a player controller based on controller's Y rotation?

Basically, the goal is: the player is on a bike. and if you press A, it starts you moving using a speed float, in the direction the player controller game object is facing. You can use a joystick to change the player's facing direction (Y rotation), and you always move forward according to the direction of the bike.

the character controller will move along the X and Z axes at the speed specified by the speed float, using a controller move action, but I'm not sure how to add the speed to the move vector based on the Y direction of the player. (to deal with diagonal movement in the world.)

How is this achieved? I originally used a rigidbody add force thing, but I could not figure out how to make gravity work while also preventing it from ramming into inclines and hills it met. So I'm using a player controller because it knows how to fall and go up and down hills normally.

57
Hello. I have two issues. one with moving the map in the map view, and one with rotating the camera around the player in normal gameplay. they work fine. BUT, these things are slooow in play mode, and super fast in builds. i am wondering if the float operators used need to use delta time instead of "every frame" or something?

in the map view, you press the left stick, and the camera moves in front of the textured map plane. here's how it's set up:
get axis vector of the Left Gamepad Stick.
get the current camera position's x and y floats.
do a float operator to add the input axis vector to the position floats.
set the new camera position.
all are set to 'every frame.'
it works normally except for the speed changing wildly. in builds the camera moves around the map quickly, but in play mode it moves slowly. i am worried the default map move speed will be different for players depending on their computer's specs. i seem to remember something about using 'delta time' to ensure the view changes in a speed independent of frame rate, but I'm not sure how that would apply here. in play mode, everything else works normally, but at a lower frame rate than builds, but there's no noticeable input differences except for these.


The second problem is the same, except it's with regard to using the gamepad stick to rotate the camera centered around the player model. in play mode, it rotates slowly, and in builds, it rotates wildly fast.

for camera rotation around the player, it's this:
get axis vector of right stick.
vectory3 add xyz, to add the axis input to the current camera rotation.
wait till next frame, repeat.

in both of these cases I can change the input axis multiplier floats to "fix" this, but this makes it hard to figure out what the default speeds should be since it varies.

what can I do to make these changes to position and rotation, happen at a speed independent of player's computer speeds (and to not need two different multiplier float settings to toggle depending on if I'm testing in play mode or in a build)?

for all I know for a player with a fast computer the camera might rotate so fast the game is unplayable, and for all I know on someone's computer that's slow, it might rotate so slow it's unplayable, so I am worried about this.

58
Action Requests / Particle System Set Force Over Lifetime?
« on: March 26, 2019, 01:11:31 PM »
Hello. The rain system is attached to the player. When the player gets into and drives a car, I want to change the direction of the particles to move sideways from in front of the player to hid the windshield, like how rain looks while driving. Normally the rain falls straight down but moves more sideways in a car.

But I can't find an action to set the Force Over Lifetime of a particle system. if this does not exist, it would be very useful to have. It seems it needs an XYZ vector3, and being able to do it each frame would be great so I could slowly change the particle direction as the car speed increases. Is it possible?

59
I need to round a float up to the nearest integer, and I also need to separately store the float's remainder to do operations on it. I'm not sure which actions are best for this kind of thing. "Float Round to Nearest" won't do it, as I need to say "is the float an integer? if not, round it up to the next integer." What's the best way to tackle this?

60
I wanted an array of audio clips in an fsm to select from by name. so i made an array variable. the list for its types did not contain an audio clip option, so I changed it to object, unityengine, audio clip. upon doing this. the array changed from being an array, to just being an audio clip in the Variables Tab under its Type button on the right side of the menu. the array below seems to act normal, but it's now listed as an Audio Clip instead of as an array.

Area: Editor
Frequency: Always

Unity Info:
Unity Version: 2018.3.0f2
Playmaker Version: 1.9.0.f5
BuildTarget: StandaloneWindows64

System Info:
OS: Windows 10  (10.0.0) 64bit
Processor: AMD FX(tm)-4130 Quad-Core Processor
System Memory: 32749
Graphics Device: NVIDIA GeForce GTX 970

Pages: 1 2 3 [4] 5 6 ... 19