Jump to content

Two questions about facetdata and ...


BangTao
 Share

Recommended Posts

hi.me again////

Q1:Look at this PG.i set the position x and y to 5.Is there anything I missed?http://www.babylonjs-playground.com/#2KXNQ6#6

Q2:this.http://www.babylonjs-playground.com/#24NW28,,and i wanna check the red ball and the wihte ball(tmpDistance and shortest) every time i change the ball's position in the loop ..but it didn't work..

and if i set ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓

var octreeSub = {X: 100, Y: 100, Z: 100};

i can't get the green box...which is http://www.babylonjs-playground.com/#2KXNQ6#7

thank u thank u. > <

 

Link to comment
Share on other sites

@BangTao hi again you have asked similar questions two or three times and jumped into Mesh Facet Data thread with a PG combining a little of what you were doing with some of what I showed you and some very new methods without a full understanding- result confusion. Please take a deep breath and think through what you want. You are tending to ask technical questions about your code without telling us what you want to achieve..

You could explain what you want to do overall and the particular area that is causing problems and diagrams could help.

So while the following description may not be what you want to do, use it as a basis to try to explain your project and problems together with your playground.

I have a 3D grid of cells within this grid there is a large sphere and a small sphere. The small sphere moves around in the cells when it hits the large sphere it changes color. I am using a for loop for the animation and it is not working. How do you animate the small sphere so that I can check when it hits the large sphere. I have produced a playground without the cells to show my problems with animation.

Also I have seen that you have been trying to use scene.registerAfterRender or scene.registerBeforeRender here are some links of them in action that might help you learn about them.

http://www.babylonjs-playground.com/#92EYG#10

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

http://www.babylonjs-playground.com/#1JLGFP#3

Basically they deal with changing properties of a mesh after or before each frame is drawn that way is one method of animating a mesh..

Link to comment
Share on other sites

@JohnKThank u for reply me,i'm new this,so..and there will be many problems for me...hope u don't mind it.I've take a very deep breath,and come again~~and i kinda know what i'm i want...erm ...

 

i wanna use the " for loop " to control the red little ball's move path (seems like there missed something),not useing scene.registerAfterRender.but if i directly use "for loop",i cant get the Facet Data to check if ...collision

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