Main Menu

Recent posts

#71
Support / Re: Disable cameraLookAt
Last post by AeroShark333 - January 13, 2023, 07:19:15 PM
I'd temporarily store/clone the RotationMatrix of the camera on the moment you enable the freecam. This means you'll have the last known camera rotation matrix which was used when the camera used #lookAt(...). Then instead of doing #lookAt(distantDummy), you do #setRotationMatrix(temporaryMatrix)
#72
Support / Disable cameraLookAt
Last post by Ackastar - January 13, 2023, 04:21:30 PM
Essentially I have a camera looking at and following a vehicle as it moves around in 3d space and sometimes I'd like to disable the lookat and start a freecam.
i.e turn of the cameraLookAt temporarily to be able to move around by translating the cameras position, maintaining its rotation.

I've so far tried to create a distant point to replace cameraLookAt(vehicle) with cameraLookAt(distantDummy) but im not quite satisfied with the solution.

Has anyone done anthing similar?

Thanks
#73
Support / Re: raspberry pi, orange pi, e...
Last post by EgonOlsen - December 04, 2022, 10:54:26 PM
Yes, sure...the software renderer will work just as it is on a Pie.
#74
Support / Re: raspberry pi, orange pi, e...
Last post by MichaelJPCT - December 04, 2022, 10:02:40 PM
what about the software renderer of jpct? although slow, it is useful in some cases.
#75
Support / Re: raspberry pi, orange pi, e...
Last post by AeroShark333 - December 04, 2022, 03:00:18 PM
Afaik, you can even run Android on a Raspberry Pi which has proper OpenGLES support. In that case jPCT-AE could be used.
But then again, I would argue that you can make jPCT work on a Linux distro too (Raspbian or such). I would believe that there should be some sort of OpenGL support available as for how popular the Raspberry Pi is. It might not work as seamlessly as on Windows but I wouldn't know for sure until someone tried :D
#76
Support / Re: raspberry pi, orange pi, e...
Last post by EgonOlsen - December 04, 2022, 09:04:11 AM
No, not as it is. While you can run a JVM on these devices, I don't think (correct me, if I'm wrong please) that there is an OpenGL (ES) binding for Java available on these devices. Without that, it can't be ported.
#77
Support / raspberry pi, orange pi, etc
Last post by MichaelJPCT - December 04, 2022, 06:11:14 AM
does jpct work on these devices?
there devices are marketed as computers for students. if jpct works on them, more students would get to know jpct.  :)
#78
Support / Re: How does JPCT-AE Vertex wo...
Last post by EgonOlsen - November 26, 2022, 09:31:27 PM
Order matters here. jPCT culls away back faces (unless you disable this with setCullling(), but the lighting will be wrong in this case). What is a back face and what isn't is defined by the order of the vertices in a triangle. In this case, reverse the order of the vertices for the faces that aren't visible and they should show up.
#79
Support / How does JPCT-AE Vertex works ...
Last post by Hellfire - November 25, 2022, 03:45:26 PM
Hello friends. How does JPCT-AE Vertex works on Object3D.addTriangle(...)?

public static Object3D createCube(float scale) {
Object3D o = new Object3D(12);
float size = scale / 2;

// FRONT
o.addTriangle(new SimpleVector(-size, size, size), new SimpleVector(-size, -size, size), new SimpleVector(size, size, size));
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(size, -size, size), new SimpleVector(-size, -size, size));

// BACK
o.addTriangle(new SimpleVector(-size, size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(size, -size, -size), new SimpleVector(-size, -size, -size));

// LEFT
o.addTriangle(new SimpleVector(-size, size, size), new SimpleVector(-size, -size, size), new SimpleVector(-size, size, -size));
o.addTriangle(new SimpleVector(-size, size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(-size, -size, size));

// RIGHT
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(size, -size, size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(size, -size, -size), new SimpleVector(size, -size, size));

// UPPER
o.addTriangle(new SimpleVector(size, size, size), new SimpleVector(-size, size, size), new SimpleVector(size, size, -size));
o.addTriangle(new SimpleVector(size, size, -size), new SimpleVector(-size, size, -size), new SimpleVector(-size, size, size));

// LOWER
o.addTriangle(new SimpleVector(size, -size, size), new SimpleVector(-size, -size, size), new SimpleVector(size, -size, -size));
o.addTriangle(new SimpleVector(size, -size, -size), new SimpleVector(-size, -size, -size), new SimpleVector(-size, -size, size));
return o;
}

Result:
#80
Support / Re: How to display 2D image to...
Last post by AeroShark333 - November 22, 2022, 03:05:15 PM
Quote from: Hellfire on November 22, 2022, 12:39:50 PM
Thank you, its working, i didn't have the perfect texture though  ::) ::)
Glad to hear!

For a joystick, I'd recommend a PNG file as texture (where the outside is transparent), otherwise a JPG texture (where the outside is black).
Make sure to use the constructors in Texture that have 'useAlpha' (which you should then set to true): https://www.jpct.net/jpct-ae/doc/com/threed/jpct/Texture.html#Texture-Bitmap-boolean-