Quantcast
Channel: Latest Questions by alexkaskasoli
Browsing all 56 articles
Browse latest View live
↧

Character stand straight

I've implemented a spell casting system where my character always faces where he is casting. This some times makes his y rotation change when he's casting upwards (flying enemy etc). I would like to...

View Article


Is character facing in the direction of camera?

How could I check if the character is facing in the direction of the camera or away from it?

View Article


ControllerColliderHit, two objects, takes wrong one

I'm using this code to detect the collision between my player and "Cloud" gameObject. Funnily enough this code: function OnControllerColliderHit(hit : ControllerColliderHit) { if...

View Article

How to get NetworkViewID and GameObject attached to NetworkViewID

I can't seem to find reliable information about this. I have a Network View component attached to a game object. How can I access this Game Objects NetworkViewID from code? I have tried...

View Article

Drawing a box with mouse dragged on screen

When a user clicks mouse0 I set a Vector2 orgBoxPos = Input.mousePosition; While he is holding down mouse0, I constantly update Vector2 endBoxPos = Input.mousePosition; I then try this to draw this box...

View Article


If button held 3 seconds do something

I'm trying to do a Crouch/Lay down system: 1) Press C => crouch 2) Hold C for 3 seconds => lay down The logical way to do this seemed to be to use a timer: if (Input.GetButtonDown ("Crouch")) {...

View Article

Character Controller/Motor Ground Delta

Is there a way to set a distance between the Character Controller/Motor and the ground? My ground is quite wobbly and I would like to avoid shaking the character and the camera by having the character...

View Article

Voxel Lighting

I'm working on a Voxel project for fun and learning. I've been reading up a lot on how this is done and have implemented a simple Voxel map in my project. My question is about the lighting. I've read...

View Article


UV Map, change texture color (lighter/darker)

I'm trying to figure out how I could make my own lighting system for my UV map in Unity. I have the theory nailed down (I believe) but I'm having problems on the practical side. I have a voxel...

View Article


Self-Illum Diffuse, how does it work?

I'm trying to use the built in self-illum diffuse shader. I have put a Base and an Illum texture on the object. The Illum is all black for testing purposes (also tried different shades). The Illum...

View Article

Shader that uses UV1 to map texture and UV2 to map light

I'm using a texture atlas and a light atlas to tile a mesh. I have the texture atlas working fine. I can apply textures and create a sort of tile map on my coded mesh. At the moment I'm using the...

View Article

Getting all scripts attached to a gameObject (Problem)

GameObject go = GameObject.Instantiate(bullet, transform.position, Quaternion.identity) as GameObject; Component[] c = go.GetComponents(MonoBehaviour); foreach (MonoBehaviour script in c) {...

View Article

Making a jump with Rigidbody2D character

I'm trying out the newish Unity 2D features. I'm trying to make a basic platformer. I've got left/right movement working with AddForce but I'm getting stuck on the jump. Here's what I have: if...

View Article


Simple Rigidbody2D controller (Platformer Jump)

I'm trying to make a very simple character controller script for an object with a rigidbody2D (aiming for basic 2D platformer gamelay with WASD and Space to jump). void HandleMovement() { if...

View Article

Best way to make a tilemap with the 2D features

I'm wondering what is the best way to make a tilemap with the 2D features. (Tilemap for a platformer like an old mario, not top-down like an old rpg, if that changes anything). What I've thought of so...

View Article


Getting a smooth jump with the Character Controller

I'm embarrassed to post this here, as there are already several instances of this question on the boards but sadly no proper answers. This is the Update method of my PlayerControl script: void Update()...

View Article
Browsing all 56 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>