Ambiera ForumDiscussions, Help and Support. |
|
[ 1 2 ] Page 1 of 2 |
|
|||||
|
And? Anybody? |
||||
|
Array Logic??? |
||||
|
https://www.ambiera.com/forum.ph... by reading this i cant say that i understand what you need-so maybe if you are more specific then its simpler to give you a answer. |
||||
|
I need to basically clone dummy nodes across the surface of a planet to use them for the FPS camera to move to each node via WASD input. I have some code that someone gave me that uses the instatiate command to clone nodes across the surface of a planet. I just need to be able to have the FPS camera use them as basically waypoints in order to keep the FPS node on the surface of the planet as if there was XY gravity on every location of the uneven sphere. I don't know coding well so it would be good to have some help. |
||||
|
I made this request about an array because I know an array would be another way to do this, but I've never put one together or understand coding enough to make one. |
||||
|
If you're just wanting to scatter some cloned nodes across the planet, as marker points for camera positions, that's very easy to do without code, in 3 steps... 1- create a node and add a character behaviour to it with random patrol and a speed of 10,000. 2- add your camera position node and set it to invisible. 3-add an "every few seconds" action to the (step 1 node) to make it clone the (step 2) node. You can use a (non-code) variable (eg: variable=cam_nodes) to control how many nodes are created. EG: if you want 100 node clones, just use the following (as an action on node 1): If variable "cam_nodes"<101, set variable cam_nodes +1, clone cam_node. When you start the scene, the character node will patrol the entire scene at speed 10,000 and if there are less than 100 nodes, it will clone a new node every few ms. |
||||
|
I still don't understand. That still doesn't answer how I would get the player FPS Camera to move to the next node on proximity via wasd input. |
||||
|
i.e. if "w" is pressed, move to next node on "?" axis. |
||||
|
It's several hours later, when made my last post it was very early here the rocky mountain region. Now I came home from a couple classes and I am more awake. I read your post again VP and it kind of makes sense to me, but I could still use some help. Can you help me with a ccb file that I can work with? Thanks |
||||
|
Sure thing. I can make a ccb for you and hopefullyit does what you're asking. To make the camera move to a cloned node on proximity, you'd have to use "relative to scene node" and inthe drop-down menu you select the node that will be cloned. I'll try to make it for you tomorrow. |
||||
|
Thanks VP, right on:) |
||||
|
No worries. here's the link.... https://veganpete.itch.io/camera... Hopefully this is what you meant?... If not, feel free to comment (either here on on the download page) with more details, and I'll try to get it working for you - unless someone else can code it for you. |
||||
|
Well that's part of what I wanted. I have a document where there is an uneven sphere (planet) with nodes already spread out along its surface, I looked at the js file and they are spread along the surface with the js "instantiate" command. Someone created it for me. I guess I'm seeing if I can do my sphere world thing with pathfinding (based on player input) vs switching scenes all the time. I think if my thick skull would just let some info in I'd be able to do this. But, anyways, If I could figure how to place a camera node for each dummy clone that is already there, than that would help a lot. I guess I get confused with cloning logic so I don't know if I need to make the cameras you made a child of each dummy node that I already have (I get confused on how to do that because IDK if I'd get a compile error) or if I have to write some js, IDK. Thanks for your help what you did is really cool. |
||||
|
I'm sure it has something to do with set scene node position relative to each clone, but I don't know how to do that with each cloned node, only with normal (orginal) nodes. It's cloning logic that I need some help with. |
||||
|
Also I will mention that I own pathfinding actions/behaviors by Sammhdy and Sven. So hopefully I'd be able to get the player to move to each sensor and have the player automatically avoid static mesh obstacles. |
[ 1 2 ] Page 1 of 2 |
|