I tested it in the latest Dragon build today. It’s working in this build. Therefore all is good. In fact, my baby is falling the same! And all lights are sames. Cross compatibility yay!!
Like I don’t need the Record Animation button if UPBGE gives me a realistic real-time render for what my baby will “see” and therefore for my working viewport and for my Movie of my baby AI sim to show people. But, why exactly can’t the button be in UPBGE? More buttons makes us happy bro…I’ll pay yous like 70usd to add the button “Record Animation” back… Just it’s important to me and I want to know why it can’t be in UPBGE…there’s plenty of room for it…
Hello, I’ve installed UPBGE 0.1.9, and tried to make a vehicle using that new function. It works weird, but my main issue is that when I press “Esc” to quit the game, UPBGE crashes and closes instantaneously.
Here is my code:
from bge import logic, constraintsimport mathutils
cont = logic.getCurrentController()
scene = logic.getCurrentScene()
own = cont.owner
vehicle = constraints.createVehicle(own.getPhysicsId())
for wheel in scene.objects:
if "Wheel" in wheel.name:
wheelPos = wheel.localPosition
downDir = mathutils.Vector((wheelPos.x, wheelPos.y, wheelPos.z - 5.0))
axleDir = mathutils.Vector((wheelPos.x + 1.0, wheelPos.y, wheelPos.z))
#create the wheel
vehicle.addWheel(wheel, wheelPos, downDir, axleDir, 1.0, 1.0, False)
@Nemescraft
I think you should make a new issue. You made a reply in the issue with the notebook bug.
I tested the file and got a crash too. I used latest master build.
@Nemescraft: In your example file you are calling the script every frame and so creating again constraint with the same vehicle and wheels, this should be avoided. After this you can see that the down and axis direction of your wheels are not correct.
Btw, you don’t need mathutils.Vector for that, lists work as well.
Because downDir should point towards the ground, we put in 0 for x and y and let z be -1.
And because the axis of the wheels is parallel to the x-axis of the chassis, we set that to -1 (or any other value > 0) and y as well as z to 0.
I had the same problem a few days ago because i misunderstood the documentation:
axleDir (vector of 3 floats) – The axis the wheel rotates around, relative to the chassis.
Relative to the chassis doesn’t mean the position, it means that the axes are local (relative to the chassis). So if you want to use the x-axis of the chassis for your wheel axis, you set it to [1, 0, 0]
Unfortunately the wheels are not in the right position now, but i don’t know how to fix that.
I think wheelPos should be wheel.worldPosition - own.worldPosition because you want the position relative to the chassis, but this doesn’t work as well
What do you mean by “.Positon”? WorldPosition or LocalPosition?
I used the wheel’s local position because it is the position relative to its parent, the chassis, because when you parent it when the chassis is at 0.0, 0.0, 0.0 the wheels’ positions are correct. Also, the physics visualization is correct, it is the wheels that are weird.
Here is the new .blend: (it might be a better idea to start a new thread though)
When will UPBGE get PBRs for real-time photorealism?
How hard is it for yous to make PhysX an optional Physics Engine / plugin for UPBGE? Bullet Physics *may be better, however it lacks liquid/gas/molecules.
But are they going to give the Game Engine PBRs…OR, are they hoping that they will be allowed to, much later, smack it into 2.8 and only then get it to have PBRs by intergrating with EEVEE’s PBRs?
I mean, are they for-sure going to do it to *their program UPBGE / or have the source (or whatever)? Or, are they hoping to get it at 2.8 integration?
Yes, they are gonna use the Eevee shading to give a PBS to UPBGE. Since UP/BGE is using the viewport shading code, that is gonna get replaced for 2.8. I would suggest for the upbge devs to wait 2 months before continue working on 2.8. Well thats how i think. It my opinion, since the roadmap says, that a cluster lighting is gonna get added and a lot of code then is gonna change. So yeah, its my opinion.
Oh and another important question. Is this realistic render going to be for only VIEWPORT, or, is it during when playing your video game / simulation? The later is more important, because although a nice work-viewport is helpful+fun, realistic game/simulation Render is much more useful, actually even more fun+helpful.