i'm mid way through making a reasonably realistic player controllable car. however, no matter what i do with the on screen counters i cannot get it to display the speed of the object i've designated as the game character (a metal slab of some sort)
i've tried setting the HUD objects value to the game character speed. i've tried setting a variable datasource to the game character speed and setting the HUD value to be this variable. i've tried explicitally working out the objects speed with the X, Y and Z object velocity datasources and some pythagoras, setting this to a variable datasource and setting this value as the HUD value. none of my methods have worked, they all do not update the HUD object, so it stays at 0
however, my HUD object for the current gear works fine, displaying the right value for each gear, so i'm really not sure why one HUD object is working and the other isnt.
can anyone help?
Holy cow your car is gonna blow mine out of the water!![]()
It sounds very similar to the issues I was having with my conditional distance meter (variable data source not updating). Are you sure impulses are running through any and all filters etc., as that was the main issue I was having.Originally Posted by Reaper392
there arent any filters. i dont think i have impulses going to any of it because its just maths operations, so i'll see what i can add an impulse to (if anything)Originally Posted by pzrtak
thanksOriginally Posted by T4KShadowyours still wins on looks though, because my "car" is a giant metal slab (chosen because its easier to work with)
The variable data source, how are you trying to update it? If it's a set event, it will need an impulse.Originally Posted by Reaper392
Quite difficult to diagnose without an actual image of what's going on.
I tried and couldn't get it to work;
Set Game Character to custom object (car) in track settings.
Create Game character speed data source (Should pick up the speed of the car, but doesn't)
Set the speed visual thing to pick up the value from the character speed data source. (Stays at 0 the whole time).#
I have no idea.
the first thing i tried was T4K shadows way, taking the value directly from the speed source block.Originally Posted by pzrtak
the pythagoras method didnt use any set value events, i set it up so that the value in the datasource was always the output of the square root function.
i'll try and take a photo of my logic and upload it here
Here's what I figured out, I was having the same problem.
"Game Character Speed" will show a speed for the bike or rider or target object. However it will only show a "0" for any "Groups" of objects that are glued together. Even if that glued group is the new game character.
The same is true for "X Velocity."
Even if you set up your counters correctly int he track settings properties, they will still show "0" because there is no number being generated for the grouped object.
I tried monkeying around with this all night the other night by making a brick my game character and then putting the brick in a basket so that the brick would generate a speed value for the basket. It worked, until the physics shot the brick through the basket and into the next mountain.
I DID find a work around, but I'd love it if there was an easier fix.
Make a hinge that attaches an object to your group. (The group you want the speed from) That object must only be attached by a hinge, and not glued to any other object.
-Get a new Data source
-"Object Info Data Source" place it
-Select it's properties and move the slider almost all the way to the right for "Speed"
-Point your Data source to the non-group object that is attached by the hinge.
-Set your counter to the Object info data source.
This tracks speed in 3D along X,Y and Z at the same time.
It's messy, but it works. If anybody has an easier way, PLEASE say so.
-Kirk
i kinda found that out myself by measuring the speed of one of the wheels and taking that as the speed of the car. however, the fastest i can sensibly get the car to go is ~12 on the game character speed thing, and its not much better with revolution speed either
if anyone has a way of measuring speed a little bit more accurately so i can have a speedo going from 0-100 or something with unit steps it would be much appreciated
Make sure that you have an impulse trigger updating the value every tick, without an impulse, the value won't ever update!