[QUOTE=Cold;42966243]Why don't you divide the mesh in to chunks that take ~1ms to rebuild(and thread/Coroutine the mesh rebuilding operation, if that's possible)
You'll end up with slightly more draw calls, but it 'll become a lot more flexible.[/QUOTE]
They're already divided into chunks, it's the chunks that are taking that amount of time to rebuild. I'm sure there's a way - it's just finding the balance between object count and mesh rebuild size.
I'm currently tinkering around with Unity's 2D stuff. Looks challenging, but hopefully it's better than what I experienced with Flash.
[editline]24th November 2013[/editline]
[IMG]http://i.imgur.com/I70IBdp.png[/IMG]
This right here. This one setting. This is the bomb diggity.
Bah, [del]Animator.SetTrigger is not working as intended. Supposed to return true on the frame it is triggered and automatically reset itself on transition, but it didn't.[/del] I'm stupid apparently Trigger and Bool is not interchangeable.
I've always wanted to start making vidyas with Unity, is it easy to use?
[QUOTE=Haskell;42989236]I've always wanted to start making vidyas with Unity, is it easy to use?[/QUOTE]
It's a lot better than most other game engines that are out there and are open to indie developers however just because it has good support doesn't necessarily mean it is easy.
Had to make my own non trivial function to see if there's anything inside a cube in the world. It's so fucked how Unity is missing the simplest of things.
I mean. It has a function to get the contents of a sphere. So you do a sphere that encompasses the box, then you can use the bounds of the collision objects to test whether they're inside. And that works for ruling stuff out - but it uses the AABB of the objects. And there's no built in functions to test the OOBB.
Yikes.
[QUOTE=garry;42990051]Had to make my own non trivial function to see if there's anything inside a cube in the world. It's so fucked how Unity is missing the simplest of things.
I mean. It has a function to get the contents of a sphere. So you do a sphere that encompasses the box, then you can use the bounds of the collision objects to test whether they're inside. And that works for ruling stuff out - but it uses the AABB of the objects. And there's no built in functions to test the OOBB.
Yikes.[/QUOTE]
I'm guessing you are using Javascript?
No c#
[QUOTE=garry;42990078]No c#[/QUOTE]
Yikes,
Its bad enough trying to do this with XNA, I remember when I made this little block game, it took me all fricken night just to find out how to do collisions.
This put me off making video games forever.
[B]Picture Reference
[/B]
[IMG]http://gyazo.com/cf5c354c16c482bbd46fb3c03b0e22be.png[/IMG]
It was not worth it.
[QUOTE=garry;42990051]Had to make my own non trivial function to see if there's anything inside a cube in the world. It's so fucked how Unity is missing the simplest of things.
I mean. It has a function to get the contents of a sphere. So you do a sphere that encompasses the box, then you can use the bounds of the collision objects to test whether they're inside. And that works for ruling stuff out - but it uses the AABB of the objects. And there's no built in functions to test the OOBB.
Yikes.[/QUOTE]
are there any other examples you can think of Unity missing basic things?
[QUOTE=Haskell;42990107]Yikes,
Its bad enough trying to do this with XNA, I remember when I made this little block game, it took me all fricken night just to find out how to do collisions.
This put me off making video games forever.
[B]Picture Reference
[/B]
[IMG]http://gyazo.com/cf5c354c16c482bbd46fb3c03b0e22be.png[/IMG]
It was not worth it.[/QUOTE]
IMO, Making voxel games in unity is just making it harder for yourself.
[unity]https://dl.dropboxusercontent.com/s/e0ni37z7r80ctfa/2d%20Test%202%20Guns.unity3d?dl=1&token_hash=AAErcLBCutm6l3PQqc7orw3nZgNxbcDgvK-hwwF2YoTH4g[/unity]
Use WASD to move, space bar to jump, h or left mouse to shoot and q to change weapon.
Going to add the ability to roll, melee, attributes (str, agi, int ect), equipment and weapon buffs ie flame damage splash ect.
[QUOTE=Hiruty;42994070][unity]https://dl.dropboxusercontent.com/s/e0ni37z7r80ctfa/2d%20Test%202%20Guns.unity3d?dl=1&token_hash=AAErcLBCutm6l3PQqc7orw3nZgNxbcDgvK-hwwF2YoTH4g[/unity]
Use WASD to move, space bar to jump, h or left mouse to shoot and q to change weapon.
Going to add the ability to roll, melee, attributes (str, agi, int ect), equipment and weapon buffs ie flame damage splash ect.[/QUOTE]
The controls are really floaty :L
I do like how the weapons feel like they have weight, although the camera shaking is really obnoxious.
[QUOTE=Haskell;42990107]Yikes,
Its bad enough trying to do this with XNA, I remember when I made this little block game, it took me all fricken night just to find out how to do collisions.
This put me off making video games forever.
[B]Picture Reference
[/B]
It was not worth it.[/QUOTE]
How is C# any harder than JS in this situation? Or am I misinterpreting you? I want one reply not a flame war.
[QUOTE=Johnny Guitar;42990115]are there any other examples you can think of Unity missing basic things?[/QUOTE]
Drawing simple shapes on a Texture2D. Having to write a function for squares and circles that draw them with SetPixel() sucked.
[QUOTE=Johnny Guitar;42990115]are there any other examples you can think of Unity missing basic things?[/QUOTE]
A good GUI system.
:)
How would I go about finding what the best graphics settings would be based on user hardware?
[code]
using UnityEngine;
using System.Collections;
public class BallControl : MonoBehaviour {
public float jumpHeight = 4.0f;
public int ballSpeed = 200;
private bool isJumping = false;
void Update () {
//Rotation
float rotation = Input.GetAxis("Horizontal") * ballSpeed;
rotation *= Time.deltaTime;
rigidbody.AddRelativeTorque (Vector3.back * rotation);
//Jumping
if (Input.GetKeyDown ("space") && !isJumping) {
rigidbody.velocity = Vector3.up * jumpHeight;
isJumping = true;
}
}
public void OnCollisonStay() {
isJumping = false;
Debug.Log ("OnCollisionStay Called");
}
}
[/code]
After I jump the function OnCollisionStay is never called, does anyone know why this is?
[url=http://answers.unity3d.com/questions/142618/oncollisionstay-is-not-returning-anything.html]Its a (old) bug, sometimes it doesn't work until you restart Unity.[/url]
I had the same problem when I tried your code, but it fixed itself after I put a rigidbody component on the ground object, press play and stop, then remove the rigidbody.
Also when the ball jumps it loses all its velocity and jumps up. If its not intended then it should be something like this:
[code]
rigidbody.velocity = rigidbody.velocity + Vector3.up * jumpHeight;[/code]
[QUOTE=secundus;43005053][url=http://answers.unity3d.com/questions/142618/oncollisionstay-is-not-returning-anything.html]Its a (old) bug, sometimes it doesn't work until you restart Unity.[/url]
I had the same problem when I tried your code, but it fixed itself after I put a rigidbody component on the ground object, press play and stop, then remove the rigidbody.
Also when the ball jumps it loses all its velocity and jumps up. If its not intended then it should be something like this:
[code]
rigidbody.velocity = rigidbody.velocity + Vector3.up * jumpHeight;[/code][/QUOTE]
I put the rigidbody component on the ground, started the program, stopped it and removed it and it still didn't fix the problem. Any other suggestions?
Thanks for pointing the velocity issue out, I meant to have this
[code]
rigidbody.velocity += Vector3.up * jumpHeight;[/code]
OH WOW.
I just realized why it doesn't work for you.
[code]OnCollisonStay() //This is in your code
OnCollisionStay() //This is the one you want[/code]
:v:
Does anyone else find that they can't use the ctrl key when playing a game in the editor? To duck etc?
I made a character controller that uses swept volumes instead of any physics stuff. It has step up, step down, ducking, gravity etc.. all as separate components. The idea being that there's less physics fuck ups and it responds how you would expect it to (doesn't go through other objects, doesn't catapult miles across the scene etc)
[vid]https://dl.dropboxusercontent.com/u/3590255/OBS/obs_output_%20%2803%29.mp4[/vid]
The rough actual movement code is this
[img]http://i.imgur.com/He7G22L.png[/img]
I coded it so it's axis independent. It uses the gravity direction.. so you can change the gravity and it still works as expected ;0
[QUOTE=garry;43007298]
*snip*
[/QUOTE]
Rust2D confirmed :D
On another note, I always have trouble making character scripts unless they use a character controller. Random jitters, collision errors, etc.
Are those raytraces part of the swept volume calculations?
No the lines are just debug output that I left in showing step ups, step downs, velocity. Here without:
[vid]https://dl.dropboxusercontent.com/u/3590255/OBS/obs_output_%20%2805%29.mp4[/vid]
[QUOTE=Hiruty;42994070][unity]https://dl.dropboxusercontent.com/s/e0ni37z7r80ctfa/2d%20Test%202%20Guns.unity3d?dl=1&token_hash=AAErcLBCutm6l3PQqc7orw3nZgNxbcDgvK-hwwF2YoTH4g[/unity]
Use WASD to move, space bar to jump, h or left mouse to shoot and q to change weapon.
Going to add the ability to roll, melee, attributes (str, agi, int ect), equipment and weapon buffs ie flame damage splash ect.[/QUOTE]
The camera feels all wrong. Usually, players don't want it to move vertically at all and try to make it so that the camera looks ahead in the direction the player is facing. Shake is very discomforting for me as well. Be wary of motion sickness.
[QUOTE=garry;43007298]I made a character controller that uses swept volumes instead of any physics stuff. It has step up, step down, ducking, gravity etc.. all as separate components. The idea being that there's less physics fuck ups and it responds how you would expect it to (doesn't go through other objects, doesn't catapult miles across the scene etc)
-vid-
The rough actual movement code is this
-code-
I coded it so it's axis independent. It uses the gravity direction.. so you can change the gravity and it still works as expected ;0[/QUOTE]
What is swept volumes? I've never heard of it before.
[QUOTE=Pelf;43008357]What is swept volumes? I've never heard of it before.[/QUOTE]
A line is a swept point, so imagine the same kind of action but for a 3D body, like this:
[img]http://www.cs.cf.ac.uk/Dave/3DVG/IMAGES/sweep.gif[/img]
[editline]28th November 2013[/editline]
Swept volume collision checks to see how far you can "sweep" a 3D body until it hits something.
[QUOTE=Pelf;43008357]What is swept volumes? I've never heard of it before.[/QUOTE]
Depending on the implementation it either means generating a new volume that describes the continuous motion of a volume in a certain time (the space "air" is displaced from during the sweeping motion), or checking collisions at different points with small offsets.
The result is basically the next collision or whether the object collides during the current physics step.
Sorry, you need to Log In to post a reply to this thread.