Quick utility for vertical movement


#1

Hey all, here’s a super quick utility for moving an object up and down the Y axis at a quick pace - I’m using it for hot air balloons in my domain. Set up the userdata on an object like so with your own values:

{
  "yMin" : -10, 
  "yMax" : 10,
  "increment" : 0.5
}

Add the following to the server script property:
https://gist.githubusercontent.com/misslivirose/db32444e79aa545c05b2cd84f7a52ebb/raw/4b6348bed171424adfb0f057296e1cb51b0e181e/vertical-movement.js

Or fork this gist to change the increment values:

And then click the ‘Raw’ button to get the raw version of the script that can be used in the entity server script property.


#2

You have a ton of terrific stuff in your Github repo @MissLiviRose! I was thrilled to see all of the HiFi stuff, and ever so pleasantly surprised to see that you have Unity projects available as well. Too cool! Keep the awesome coming & thanks for all of your efforts!

  • Ken

#3

Thanks Ken! If there’s ever a specific utility script or tool that would be helpful, let me know! I’m happy to do my best to help make more resources available :slight_smile:


#4

Hi @MissLiviRose, and I’m pinging @krougeau on this because we’re collaborating on a project.

I’m wondering what you think about the following fun challenge, I write this because I’m intrigued about your script and I love that you are flying hot air balloons: I am very interested in aerial transportation in High Fidelity.

So much so that I have a standing paid freelance job on the message boards, asking for anyone with the skills to try to improve upon the SKOOL FLYER prototype - a 4 person space craft in the marketplace. This prototype is extremely buggy and clunky to fly, but I would like to use it on a project and if you think you might be able to improve it, I would be happy to discuss a fee.

In the meantime, I’m curious about this script. I’m not a coder or a 3D builder, but luckily I work with @krougeau who is rather clever. So what do the two of you think about using this script to quickly and easily send the SKOOL FLYER vertically up in the air? Currently it’s possible to fly the SKOOL FLYER but because it’s so buggy it takes way too long and it’s too unpredictable for my purposes. I need to quickly and easily “levitate” the FLYER from the ground up vertically to a height of about 40 virtual feet. Just straight up and stop, no other directional motion needed (at this time).

@krougeau, this would allow us to use the FLYER in our final shootout with the Gork monster. Which is a dream of mine.

Ah, the metaverse, where we get to have conversations like this!

Best,

Jason Moore
W: www.jasonmoore.com
E: jasonmo@mac.com


#5

Wait, there’s a Gork monster in that secret project of yours? I don’t know what that is but it sounds great, I hope it’s 40 virtual feet high.


#6

Lol it’s not secret we’re just still fixing stuff and not quite ready for prime time! I’d be thrilled if you would come check it out and give us feedback.

And yeah, not only is our Gork monster really big, but you also get to fight it.

Seriously I’d love to have you try it.

:slight_smile:

Jason

Jason Moore

E: jasonmo@mac.com

T: 212-991-8344

W: www.jasonmoore.com


#7

I’m up for that :man_cartwheeling:


#8

While I’m sure we can get the vertical motion coded, I’m worried it will be just as janky as the horizontal movement due to the way things are calculated & handled. Still, I’ll happily have a go at it! :smiley: I’ll pop over to NNY & see if you’ve left the existing prototype lying around. Don’t worry, I won’t break it, haha! I just need to check under the hood. :stuck_out_tongue:


#9

I’m starting to look under the hood on that one too (no pun intended) maybe we can compare notes.


#10

Awesome!! Let me know what you find…


#11

@MissLiviRose I’m getting a lot of jerkiness from the physics engine when I try to “ride” the moving object. Is there perhaps a way to parent to player to the object? How are you alleviating this with your hot air balloons? Thanks!!! :smiley:


#12

The hot air balloons that I’m using this for right now are for decoration, but you can make your avatar a child of an entity. I would say that may have some weird side effects if you don’t manually update the camera placement to something comfortable. It’s been a while since I experimented with having the parentID of the avatar set to a moving entity, but you could take a look with this API call: https://docs.highfidelity.com/api-reference/namespaces/myavatar#.setParentID


#13

Thanks so much Liv! I had a feeling parenting might be the way to go, but I’ve also heard some “hackier” ideas, such as moving the player’s “physical” form underground and manipulating the camera itself. I’ll set about some mad science and see what I can get working. Have a great day & thanks again!