- Home /
Question by
Michaelsean · Mar 12, 2013 at 12:35 AM ·
minecraftblockplace
How do I control the block placing?
I made a block placing script with help from you guys, but I don't know how to place the brick down. Do I have to add tags? Here is my script, there are no compile errors, I have a Dirt prefab, a place point that follows the camera in front of the first person. Script: #pragma strict
var DirtPrefab : Transform;
var placePointTransform : Transform;
function Start () {
placePointTransform = GameObject.Find("PlacePoint").transform;
}
function Update() {
var Block : Transform = Instantiate( DirtPrefab, placePointTransform.position,
Quaternion.identity ); }
Help
Comment
Answer by ZorNiFieD · Mar 12, 2013 at 12:44 AM
well, it looks like you are using the transform of the object you are assigning in the project editor. Maybe you should use a different Vector3 instead of the prefab's default transform location? have you checked to confirm the location of the vector 3?
Your answer
![](https://koobas.hobune.stream/wayback/20220613094237im_/https://answers.unity.com/themes/thub/images/avi.jpg)