# Q3D V-2.4 [3D Physics + Skeletal Animation UPDATE]

### » Tue Feb 24, 2015 4:59 pm

These arent Q3D questions, theyre about 3D math and camera transforms. Read up on how these things work. If you rotate the camera or move it around, the xy axis in 3D obviously dont line up with the xy coordinates of your mouse on screen because of the rotated view. You can use the viewport to project a ray.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » Wed Feb 25, 2015 1:57 am

thanks for the posts, i found the coordonates i was looking like u said with q3draycaster was easy just i was asking the wrong question, hope my next question will be the right to ask, need to know how to move the 3d sphere to the mouse position now. using x and z position in the 3d plane now since z stands as a y for 2d plane but in 3d learning 1 step at a time ....i tried with the angle(ball.x,ball.z,q3draycaster.x,q3draycaster.z) but it doesnt move towards my mouse... flys in air for some reason, and i doing it right? should i add " *math.pi/180? or /4?
B
86
S
26
G
75
Posts: 1,439
Reputation: 47,803

### » Wed Feb 25, 2015 3:21 am

it's pretty much impossible for me to debug something like this blindly. i don't know what you mean by x and z position, the point the ray-caster intersects in a collision test is returned using expressions, not .x, or .y or .z, i forget the exact name but if you look at the descriptions it should indicate what does what . Again this seem more like a linear algebra question, it's not really Q3D's job to work out the math for those things, but i might include helper functions to make it easier for novices in the future.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » Wed Feb 25, 2015 4:36 am

that will be helpfull , by x,y,z i just used the position where q3draycaster is coliding with the floor. so i just tooked the x..y.z coordonates, has the rNz pnZ but they a bit offset only the normal events as they look in actions. and variable for c2 i can use them, and yes its a algebra question basically... but not sure the ball isnt moving properly cause i did the angle calculation the right way... something its not letting it move left and right... even though i can move it if i change the ball.z coordonate . but when i try to roll it something stops it ... like an invisible collider box or smth... i did stretched the floor from physicsexample.. so im guessing its creating some problems there... here is the capx.. maybe thats the issue.... the weirdest part that i encounter so far for the movement and as reaction is the blocking invisible thing,... if is any... and also there was a a issue with the 0 origin point... it moves.... but then the origin point isnt in the middle of the sphere but on face of diffuse map not sure if that makes any sense, i currently need alot of sleep.... going on 36 hrs straight... thanks alot for the tips they where verry helpfull love the plugin so far... hope i will learn to use it better ... to bad you guys dont have enough time to do small tutorials for threejs physics(not c2 ) and other cool stuff
You do not have the required permissions to view the files attached to this post.
B
86
S
26
G
75
Posts: 1,439
Reputation: 47,803

### » Wed Feb 25, 2015 2:11 pm

Im writing a custom oimo.js physics port, theres actually no such thing as "three.js physics". You should study the examples more carefully, everything you need should be there.
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » Wed Feb 25, 2015 5:28 pm

Hi, just bought your plug-in, great stuff

everything works fine in preview but once online I got this error:

Uncaught TypeError: undefined is not a function
c2runtime.js:253 Z
c2runtime.js:91 b.Ag

this is from one of your example capx Lights & Geometry using Q3D Master (Solar System example)

I just export in html5 format as is

again work perfect in preview, but once online the error appear

edit: it seem that the error occur only when using the minify script option at export time, when I turn it off , everything fine
B
6
Posts: 2
Reputation: 414

### » Wed Feb 25, 2015 5:57 pm

yes c2 has a problem with minifiscript, and also png compression when u export try exporting as clean as possible
B
86
S
26
G
75
Posts: 1,439
Reputation: 47,803

### » Thu Feb 26, 2015 2:25 am

alexandrell77a wrote:Hi, just bought your plug-in, great stuff

everything works fine in preview but once online I got this error:

Uncaught TypeError: undefined is not a function
c2runtime.js:253 Z
c2runtime.js:91 b.Ag

this is from one of your example capx Lights & Geometry using Q3D Master (Solar System example)

I just export in html5 format as is

again work perfect in preview, but once online the error appear

edit: it seem that the error occur only when using the minify script option at export time, when I turn it off , everything fine

It's an error with the current version of the plugin (well it's due to an error in C2), the next update to come out will have it fixed using a workaround. It's due to a strange bug with construct 2's handling of inline java-script comments. If you absolutely need to export right now, the only way to fix it would be to clean all the comments out of the Q3D plugins runtime files yourself (can be done quickly with various online js beautifier/minifier tools).
B
79
S
13
G
8
Posts: 1,977
Reputation: 9,947

### » Thu Feb 26, 2015 3:28 am

Thank you, I'm in no rush right now; I can wait for an update. I'm more busy at keeping my head cold, thinking of all I can do with your nice work!
B
6
Posts: 2
Reputation: 414

### » Thu Feb 26, 2015 5:42 pm

alexandrell77a wrote:Thank you, I'm in no rush right now; I can wait for an update. I'm more busy at keeping my head cold, thinking of all I can do with your nice work!

It's a bit off topic but i just have to say it,
you cant believe, what big FACT you just bring'd to the reality, i cant see another game engine that can satisfy me more then c2, and with this plugin and many others like it, its just better and better, i love all about what is scirra community some bad , some good, but man... when u see people gathered to do 1 thing, and the devotions that some people have(Q3D Plugin, developer ) its incredible, this isn't a work to be done easy, its tedious, its hours and hours , of brain work. ... . . and in end for 30 CAD? its underpricing, and its awesome i love it cause it can bring my full ideas to reality now , 2d/3d/2.5 isometric anything i can think of, ) and wait that's not even close to the end of it, 3d physics will come soon , and animation mesh render with skeleton support, that will turn c2 into a 3d competitor , if will release the tutorials, or manual for it, even without the instructions i think its better to actually learn to use it , by following the original threejs examples, cant really think on a more easy, to understand engine then what we have now, and for those who talk trash... i seen a few... they think an APK is compiled with .RAR .... interesting things you learn by reading the whole 96 pages of Q3D Thread. ... i just want to say... its pure awesomeness at your fingers thanks to the devotion of @QuaziGNRLnose .(having university on your back, doing the plugin, working, your personal life its almost non-existent , i start to worship you ) )
B
86
S
26
G
75
Posts: 1,439
Reputation: 47,803

PreviousNext