Jump to content

non-walls and semi-gravity


Noyogi
 Share

Recommended Posts

hello,

i really hate to take your time for what seems like something that must be the birthchild of my ignorance, but i've been searching, trying different things, reading responses to posts that i thought would surely have the answer to my problem, but no, i've settled on the bottom of a murky pond writing a post with a title that surely puts me in a pen shared with the donkey.

oh gravity oh sweet gravity, if it were not for you I would wither away for I was born in gravity

my camera however, was not

my camera seems to need some push in order to believe in gravity, i mean, is not too the camera, a part of the story that i am creating should it not believe me when i tell it, oh camera believe in this gravity that i have created for you, but, no, it waits, and waits, till someone comes along with enough wisdom to say, well objects don't just start falling, there must have been some initial push, the skydiver did not just come in to existance falling from the sky, the skydiver jumped or maybe was pushed out of a plane or a hot a balloon, or that bungee jumper had to have leaped from a bridge or a hot air balloon, I say NO, I HAVE come in to existence with momentum already underway and said how did I get here and why do I have this velocity, the whale CAN just BECOME and be falling from the sky, is not saying that there is gravity enough to establish the downward (or if gravity is up, then upward) velocity of something, i'm all over the place I know

sorry

my question:

please, please, why must I shove my camera off a cliff?

also,

how can I stop the camera elipsoid from going through walls? Sure I'll except that humans to some extent can travel through walls, but cameras, no sir I will not exept this, I mean the only reason I made the wall in the first place was to keep the camera out or in, in this case. Should not a tube be a tube, there is a reason for a tube, things go inside of a tube, mario travels though tubes, does mario migrate through the walls of tubes, NO! mario uses the openings.

I apologize for what could surely be seen as unappreciative donkey talk, it's been a long day of trying to get things to work, running out of money and time, with shotty internet constantly disrupting my attempts at self solving/education.

again sorry for any attitude that may be perceived, i have tried to vent with humor, but surely there is some twang of attitude, donkey shorts

please help,

drowning,

wilding swinging arms trying to stay afloat, don't let me pull you down,

but, please,

please,

through me a life ring

Link to comment
Share on other sites

Ahhh, Noyo... you're SUCH a goofball, I'm SO proud to know you.  :D

Ok, first, the "kick the camera to make it start falling" -issue... is very common... we've seen it here often.  The magic pine-cone for that... is camera._needMoveForGravity = true;  (causes auto-fall).  I should get that documented somewhere.  It was found via forum search for "camera falls"... oddly enough.  It was in a post by me, but I'm not smart enough to know about that magic pine cone, so I must have gotten help from somewhere.  heh

http://www.babylonjs-playground.com/#2DDIU8#1

I shrunk the camera ellipsoid a bit, made the hex cylinder a bit larger, did a bit of materials adjusting, and solved absolutely nothing.  :)  But, if you are careful, you can drive the camera around inside the hex cylinder.  If you bump the green tube... its collision is working, and you can cursor away from it and all is well... maybe.

Try this. 

RUN, then click on canvas, then hold cursor up/forward until camera hits green tube.  Now cursor down/back, and camera backs-away from green tube nicely... nothing gets stuck.  No collision detect is set on the hex cylinder, so, we are supposed to travel through that.

Now do the same, but when camera hits green tube, pan the camera slightly to the left or right (with mouse), and then cursor up/forward more.  Do you see the camera move forward a tiny bit more, and then get stuck?  I do.  Once it is stuck, you have to fight like hell to get it un-stuck.  I'm not sure what is causing that.  Likely a continuous-collision condition, possibly related to cylinders having cubical bounding boxes.  I'm not sure that our built-in collision system has been properly tested with cylinders.

Now let's return your camera to its original position, and let her fall down through the green tube.

http://www.babylonjs-playground.com/#2DDIU8#2

Try to exit the green tube.  After a momentary struggle at the green wall, out we come.  Why, you might ask?  Good question.  Does collision detect work on the inside of tubes?  You have properly set them double-sided.  And we ARE seeing a momentary struggle as the camera passes through the green tube wall.  hmm.

To be truthful, you might be the first to ever try a collision detection from the inside of a double-sided tube.  Needless to say, it has issues.  SO, to summarize...

1. When colliding camera with doubleside green tube from OUTSIDE, camera can be slightly panned after initial collision, and can continue semi-forward into a "stuck" condition.

2. When colliding camera with doubleside green tube from INSIDE, camera is momentarily slowed at collision point, but allowed to continue through tube wall.

Yuh, yuh, yuh, we got a few issues here.  I think your code is fine, Noyo.  I think we (all) have some tests on the framework... to do.  There are some Gods of Collision around here... and hopefully they already know what is happening here.  I'm not proficient at all... with collisions, except perhaps the collisions I have with others' personalities.  :) 

No problems here, with that.  I love your personality, Noyo!  Most folks around here... prefer the forum questions to be more succinct, but they just don't understand the enjoyments of taking the long bus to school.  (huh?)  :)  You did it well, but do you see the way I did the 1. and 2. above?  Generally speaking, spinning an engaging yarn is enjoyable and welcome, but somewhere near the end of your post, do a brief summary of the issues.  Be very succinct and to the point... for maximum attention from the super-techs.

Ok, that said, let's talk about the emotional pressure felt by green tube, who is a female tube, by the way (most tubes ARE female & most extrusions are male).  She feels societal pressure from outside herself... and has collisions with outside expectations, where she gets stuck in situations that she can't seem to escape.  She also feels pressure from the inside, but she doesn't hold-in those feelings well, and allows things to escape from her control.  It all started back in her childhood.  She was encouraged to share, and be open, right up until the time she grew sexual bumps.  Then her parents suddenly did a 180 degree turn, and said "DON'T SHARE ANYTHING WITH ANYONE!". This lead to an internal conflict which haunted her through her teen years. She is well-versed in the teachings of the ancient Fallopian Scrolls... regarding tubular operations, but...  (yawn).  Kbye.  :)

 

Link to comment
Share on other sites

Thank you, thank you, thank you @Wingnut. I was about to give up and just animate on down the tube, I much prefer to let gravity do the trick. I returned the 6 sided cylinder for 6 rotated grounds, and raised the tube up. I was trying to keep the number of meshes down but, this makes it easier to have different textures on each wall. I will try and post a playground, a little later.

Just now, Wingnut said:

 

camera._needMoveForGravity = true;  (causes auto-fall)

 

 

Link to comment
Share on other sites

@Wingnut I finally made a playground, I struggled mostly because I am trying to use multiple scenes, but the scenes are written within one script in a single index.html

I tried to break them in to seperate .js files and use the scene loader to bring them in but I think that only works for .babylon files

It seems like most of the options available are directed at importing files from blender or 3dsmax, I really like 3dsmax but am trying to create something that is light on its feet, quick handling, responsive, no time at load screens, one of the scenes, the first one, "portal" is to act like a load screen, I figured the lightest would be to write everything in bjs, my scenes are all very simple, but if it works better to create the scenes in 3dsmax and import them, that'll work.

http://www.babylonjs-playground.com/#1FOXSC

 

Link to comment
Share on other sites

Niiiiiiice!  Well done.  http://www.babylonjs-playground.com/#1FOXSC#1

I removed some playground-unnecessary things at the bottom.  The playground does SOME things FOR us.  It loves us.  :)

Ya done gooooood, though!  Take a look at this... http://www.babylonjs-playground.com/#179VAS#4

See how I "inject" a <script> element into playground's document.head (lines 1-4)?  Jerome taught me that. 

That long fall down the tube... looks excellent, eh?  Purrrrrrdy.

Besides importing mesh or loading scenes with .babylon files, you can also load textures into a cache.  It is often done with the AssetsManager... which you can add loading-tasks-to.

But yeah, there is a time to graduate from the playground and use your "project environment".  Sometimes project gets too big for playground.

Later, you'll find that the playground is a great place to show a portion of your project.  If you have troubles with something in your project, you try to "reproduce" the problem... in a very simple playground scene.  Then post the question (in Q/A area) and paste the playground URL into that post.  That way, the entire forum can work to solve the problem.

We don't see many people use...    .convertToUnIndexedMesh()   or   .freeze()   .  Wingnut doesn't know what those are used-for.  I have never used them.  Did you meet a wizard that told you to use those?  Tell me the story.  :) 

Again, well done!  You're now a BJS pro... on your way to owning a software company and becoming rich.  ;)  yay!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...