dotnet / dotnet/macios

SpriteKit GameScene with AnchorPoint at 0, 0

Open
#5,010 0 comments 0 reactions 0 assignees View on GitHub
templates
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 12h
Merged PRs (30d)
123

Description

Hello :slightly_smiling_face: is there any reason why `GameScene.sks` from SpriteKit template on VS4M has an AnchorPoint at `0, 0` instead `0.5 , 0.5`. I know sounds silly, but is bit confusing when you try to place a SKSpriteNode on 0,0 and you can’t see in a brand new SpriteKit project created by VS4M, but you can if do the same thing on Xcode.

### Steps to Reproduce

1. Create a new SpriteKit iOS project
2. Create a SKShapeNode at 0, 0
3. Run the App

### Expected Behavior

Display the SKShapeNode at the origin

### Actual Behavior

The `SKShapeNode` is out of viewport.

The problem seems related with the AnchorPoint value from the `GameScene.sks` created by the Visual Studio for Mac. Xcode Anchor point is set to 0.5, 0.5 by default.

![vuuhik0rtk](https://user-images.githubusercontent.com/926868/47177490-8924c700-d2e6-11e8-8bc9-991597c0d673.gif)

Environment info
```
Visual Studio Professional 2017 for Mac
Version 7.6.8 (build 38)
Installation UUID: 96beb2f7-2b94-4189-8e88-9ac741a715e3
Runtime:
Mono 5.18.0.128 (2018-08/3e89a56e50d) (64-bit)
GTK+ 2.24.23 (Raleigh theme)
Xamarin.Mac 4.4.1.178 (master / eeaeb7e6)

Package version: 518000128

NuGet
Version: 4.3.1.4445

.NET Core
Runtime: /usr/local/share/dotnet/dotnet
Runtime Versions:
2.1.4
2.0.5
SDK: /usr/local/share/dotnet/sdk/2.1.402/Sdks
SDK Versions:
2.1.402
2.1.4
MSBuild SDKs: /Library/Frameworks/Mono.framework/Versions/5.18.0/lib/mono/msbuild/15.0/bin/Sdks

Xamarin.Profiler
Version: 1.6.3
Location: /Applications/Xamarin Profiler.app/Contents/MacOS/Xamarin Profiler

Xamarin.Android
Version: 9.0.0.20 (Visual Studio Professional)
Android SDK: /Users/viniciusjarina/Library/Android/sdk
Supported Android versions:
4.1 (API level 16)
4.2 (API level 17)
4.3 (API level 18)
4.4 (API level 19)
4.4.87 (API level 20)
5.0 (API level 21)
5.1 (API level 22)
6.0 (API level 23)
7.0 (API level 24)
7.1 (API level 25)
8.0 (API level 26)
8.1 (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.3

Java SDK: /usr
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)

Android Designer EPL code available here:
https://github.com/xamarin/AndroidDesigner.EPL

Xamarin Inspector
Version: 1.4.3
Hash: db27525
Branch: 1.4-release
Build date: Mon, 09 Jul 2018 21:20:18 GMT
Client compatibility: 1

Apple Developer Tools
Xcode 10.0 (14320.25)
Build 10A255

Xamarin.Mac
Version: 5.0.0.0 (Visual Studio Professional)
Hash: b40230c0
Branch:
Build date: 2018-09-27 11:41:37-0400

Xamarin.iOS
Version: 12.0.0.15 (Visual Studio Professional)
Hash: 84552a46
Branch: xcode10
Build date: 2018-09-17 21:54:33-0400

Build Information
Release ID: 706080038
Git revision: f4178f550a4de7c03aa23678041abe4fc388cf72
Build date: 2018-09-28 14:21:41+00
Build branch: release-7.6
Xamarin extensions: 051b653186a95ced1c127dfd8c358df1b9315d0d

Operating System
Mac OS X 10.13.6
Darwin 17.7.0 Darwin Kernel Version 17.7.0
Thu Jun 21 22:53:14 PDT 2018
root:xnu-4570.71.2~1/RELEASE_X86_64 x86_64
```

> VS bug [#708627](https://devdiv.visualstudio.com/DevDiv/_workitems/edit/708627)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.